STRING INFO EXAMPLE

The following .NET application has been developed using ABCpdf, ASP.NET, and the C# language.

This ABCpdf example gets string information about an object.

using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Drawing;
using System.Text;
using System.Net;
using System.IO;
using WebSupergoo.ABCpdf8;

namespace ABCpdfExamples
{
    public partial class test : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            // ---- Gets string information about an object ----
            Doc doc = new Doc();
            string thePath = Server.MapPath("~/images/foxdog.jpg");
            int theID1 = doc.AddImageFile(thePath, 1);
            int theID2 = doc.GetInfoInt(theID1, "XObject");
            string theWidth = doc.GetInfo(theID2, "Width");
            string theHeight = doc.GetInfo(theID2, "Height");
            lblResults.Text += 
            "<br>(String information about an object)<br>Width: " + 
                theWidth + "<br>" + "Height: " + theHeight + "<br>";
            doc.Clear();
        }
    }
}

String Info

© 1997-2021    Codehacker - All Rights Reserved