Gets information about an object.




Info = Doc.GetInfo(ID, Type)



Name Type Description
ID Long The Object ID of the object to be queried.
Type String The type of information to be retrieved.
Info String The returned information.




After you modify a document, you may want to get back information about the objects you have added. For example, you might want to find out the natural dimensions of an image or you might want to find out how many characters were drawn when you inserted some text. This method allows you access to this information.

There are core information types that all objects support. There are also information types specific to particular types of object. You can use core information types to allow you to iterate through every object in your document finding out specific information about each of them.

If the object does not exist or does not support the requested type of information, then an empty string is returned.

Every object supports the ID and Type properties. For more detailed information about this and other properties, see the PDF Objects section of this document.

PDF objects are case-sensitive, so be sure you use the correct case when specifying information.




The following code snippet illustrates how one might find out the natural dimensions of an image.

Set theDoc = Server.CreateObject("ABCpdf10.Doc")
theID1 = theDoc.AddImageFile("c:\mypics\mypic.jpg", 1)
theID2 = theDoc.GetInfo(theID1, "XObject")
theWidth = theDoc.GetInfo(theID2, "Width")
theHeight = theDoc.GetInfo(theID2, "Height")
Response.Write "Width " & theWidth & "<br>"
Response.Write "Height " & theHeight & "<br>"