Retrieving the List of Objects Available in a Document

The Page object provides a read-only property named "Objects" that returns an array of objects contained in the page. To browse through all the objects of a page, one can use the following C# code:

 

Example

IacPage page1 = document.GetPage (1);

AmyuniPDFCreator.IacAttribute attribute = page1.AttributeByName("Objects");

 

// listobj is a collection of graphic objects

System.Collections.IEnumerable listobj 

    = (System.Collections.IEnumerable)attribute.Value;

 

foreach ( AmyuniPDFCreator.IacObject iacObj in listobj )

{

    string msg = "Name: " + iacObj.Name + "  "+ "Type: " 

                + iacObj.AttributeByName("ObjectType").Value.ToString();

    await (new Windows.UI.Popups.MessageDialog( msg, "Document Objects Property - Sample")).ShowAsync();

}