Type Default Read Only Description
[C#]
int

[Visual Basic]
Integer
  0 Yes The root catalog object.

 

   

Notes
 

This property holds the ID of the catalog object.

The catalog is the root of the whole PDF document. It contains information on the root Pages object and the Outline object.

For dynamically created documents the root of the document is always one. However documents read from existing PDF files may use different root IDs.

 

   

Example
 

The following code snippet illustrates how one might find some information about a PDF document.

[C#]
Doc theDoc = new Doc();
theDoc.Read(Server.MapPath("../mypics/mydoc.pdf"));
string theVers, theNames, thePages, theOutlines;
theVers = theDoc.GetInfo(theDoc.Root, "Version");
theNames = theDoc.GetInfo(theDoc.Root, "/Names");
thePages = theDoc.GetInfo(theDoc.Root, "pages");
theOutlines = theDoc.GetInfo(theDoc.Root, "outlines");
Response.Write("Version " + theVers + "<br>");
Response.Write("Names " + theNames + "<br>");
Response.Write("Pages ID " + thePages + "<br>");
Response.Write("Outlines ID " + theOutlines + "<br>");
theDoc.Clear();

[Visual Basic]
Dim theDoc As Doc = New Doc()
theDoc.Read(Server.MapPath("../mypics/mydoc.pdf"))
Dim theVers As String,theNames As String,thePages As String,theOutlines As String
theVers = theDoc.GetInfo(theDoc.Root, "Version")
theNames = theDoc.GetInfo(theDoc.Root, "/Names")
thePages = theDoc.GetInfo(theDoc.Root, "pages")
theOutlines = theDoc.GetInfo(theDoc.Root, "outlines")
Response.Write("Version " + theVers + "<br>")
Response.Write("Names " + theNames + "<br>")
Response.Write("Pages ID " + thePages + "<br>")
Response.Write("Outlines ID " + theOutlines + "<br>")
theDoc.Clear()

This might result in the following output.

Version /1.4
Names 12 0 R
Pages ID 618
Outlines ID 2169