Aspose.Pdf

Set Document Information

Document is the root object in the Document Object Model of Aspose.Pdf . A Document object represents a PDF file. In Aspose.Pdf , the Document object is represented by Pdf class. Using Pdf class, it is possible to set the properties of PDF document during creation.

 

The six properties that represent PDF document's information are:

 

 

Simply, instantiate the Pdf instance and set its properties (that is Author , Creator etc.) to desired values.

 

Example:

 

[C#]

 

//Instantiate Pdf instance by calling its empty constructor

Pdf pdf1 = new Pdf();

 

//Set the properties of Pdf instance

pdf1.Author = "Tommy Wang";

pdf1.Creator = "Aspose.Pdf";

pdf1.Keywords = "Hello World";

pdf1.Subject = "Example";

pdf1.Title = "Example";

...

 

[VB.NET]

 

'Instantiate Pdf instance by calling its empty constructor

Dim pdf1 As Pdf = New Pdf()

 

'Set the properties of Pdf instance

pdf1.Author = "Tommy Wang"

pdf1.Creator = "Aspose.Pdf"

pdf1.Keywords = "Hello World"

pdf1.Subject = "Example"

pdf1.Title = "Example"

...

 

[XML]

 

<Pdf xmlns="Aspose.Pdf" Author="Tommy Wang"

    Creator="Aspose.Pdf" Keywords="Hello World"

                Subject="Example" Title="Example">

 

        ...

 

        </Pdf>

 

Note: You can press CTRL-D in Adobe Acrobat to view the PDF document information.