PdfDocumentInformation Class
A class containing the information about the document.
Inheritance
Inherited Members
Namespace: Syncfusion.Pdf
Assembly: Syncfusion.Pdf.Base.dll
Syntax
public class PdfDocumentInformation : IPdfWrapper
Remarks
To know more about refer this link .
Examples
//Create a new document.
PdfDocument pdfDoc= new PdfDocument();
//Creates a new page
PdfPage page = pdfDoc.Pages.Add();
//Set the Document`s properties.
pdfDoc.DocumentInformation.Title = "Document Properties Information";
pdfDoc.DocumentInformation.Author = "Syncfusion";
pdfDoc.DocumentInformation.Keywords = "PDF";
pdfDoc.DocumentInformation.Subject = "PDF demo";
pdfDoc.DocumentInformation.Producer = "Syncfusion Software";
pdfDoc.DocumentInformation.CreationDate = DateTime.Now;
//Save the document
pdfDoc.Save("DocumentInformation.pdf");
pdfDoc.Close(true);
'Create a new document.
Dim pdfDoc As PdfDocument= New PdfDocument()
'Create a new page
Dim page As PdfPage = pdfDoc.Pages.Add()
'set the Document`s properties.
pdfDoc.DocumentInformation.Title = "Document Properties Information"
pdfDoc.DocumentInformation.Author = "Syncfusion"
pdfDoc.DocumentInformation.Keywords = "PDF"
pdfDoc.DocumentInformation.Subject = "PDF demo"
pdfDoc.DocumentInformation.Producer = "Syncfusion Software"
pdfDoc.DocumentInformation.CreationDate = DateTime.Now
'Save the document
pdfDoc.Save("DocumentInformation.pdf")
pdfDoc.Close(True)
Properties
Author
Gets or sets the author.
Declaration
public string Author { get; set; }
Property Value
Type | Description |
---|---|
System.String | The author of the document. |
Examples
//Create a new document.
PdfDocument pdfDoc= new PdfDocument();
//Creates a new page
PdfPage page = pdfDoc.Pages.Add();
//Set the Document`s properties.
pdfDoc.DocumentInformation.Title = "Document Properties Information";
pdfDoc.DocumentInformation.Author = "Syncfusion";
pdfDoc.DocumentInformation.Keywords = "PDF";
pdfDoc.DocumentInformation.Subject = "PDF demo";
pdfDoc.DocumentInformation.Producer = "Syncfusion Software";
pdfDoc.DocumentInformation.CreationDate = DateTime.Now;
//Sets the modification date
pdfDoc.DocumentInformation.ModificationDate = DateTime.Now;
//Save the document
pdfDoc.Save("DocumentInformation.pdf");
pdfDoc.Close(true);
'Create a new document.
Dim pdfDoc As PdfDocument= New PdfDocument()
'Create a new page
Dim page As PdfPage = pdfDoc.Pages.Add()
'set the Document`s properties.
pdfDoc.DocumentInformation.Title = "Document Properties Information"
pdfDoc.DocumentInformation.Author = "Syncfusion"
pdfDoc.DocumentInformation.Keywords = "PDF"
pdfDoc.DocumentInformation.Subject = "PDF demo"
pdfDoc.DocumentInformation.Producer = "Syncfusion Software"
pdfDoc.DocumentInformation.CreationDate = DateTime.Now
'Sets the modification date
pdfDoc.DocumentInformation.ModificationDate = DateTime.Now
'Save the document
pdfDoc.Save("DocumentInformation.pdf")
pdfDoc.Close(True)
See Also
CreationDate
Gets or sets the creation date of the PDF document
Declaration
public DateTime CreationDate { get; set; }
Property Value
Type | Description |
---|---|
System.DateTime | The System.DateTime. |
Examples
//Create a new document.
PdfDocument pdfDoc= new PdfDocument();
//Creates a new page
PdfPage page = pdfDoc.Pages.Add();
//Set the Document`s properties.
pdfDoc.DocumentInformation.Title = "Document Properties Information";
pdfDoc.DocumentInformation.Author = "Syncfusion";
pdfDoc.DocumentInformation.Keywords = "PDF";
pdfDoc.DocumentInformation.Subject = "PDF demo";
pdfDoc.DocumentInformation.Producer = "Syncfusion Software";
pdfDoc.DocumentInformation.CreationDate = DateTime.Now;
//Save the document
pdfDoc.Save("DocumentInformation.pdf");
pdfDoc.Close(true);
'Create a new document.
Dim pdfDoc As PdfDocument= New PdfDocument()
'Create a new page
Dim page As PdfPage = pdfDoc.Pages.Add()
'set the Document`s properties.
pdfDoc.DocumentInformation.Title = "Document Properties Information"
pdfDoc.DocumentInformation.Author = "Syncfusion"
pdfDoc.DocumentInformation.Keywords = "PDF"
pdfDoc.DocumentInformation.Subject = "PDF demo"
pdfDoc.DocumentInformation.Producer = "Syncfusion Software"
pdfDoc.DocumentInformation.CreationDate = DateTime.Now
'Save the document
pdfDoc.Save("DocumentInformation.pdf")
pdfDoc.Close(True)
See Also
Creator
Gets or sets the creator.
Declaration
public string Creator { get; set; }
Property Value
Type | Description |
---|---|
System.String | The creator. |
Examples
//Create a new document
PdfDocument pdfDoc = new PdfDocument();
//Creates a new page and adds it as the last page of the document
PdfPage page = pdfDoc.Pages.Add();
//Set the document`s information
pdfDoc.DocumentInformation.Title = "Document Properties Information";
pdfDoc.DocumentInformation.Author = "Syncfusion";
pdfDoc.DocumentInformation.Keywords = "PDF";
pdfDoc.DocumentInformation.Subject = "PDF demo";
pdfDoc.DocumentInformation.Producer = "Syncfusion Software";
// Sets the documents creator information
pdfDoc.DocumentInformation.Creator = "Essential PDF";
pdfDoc.DocumentInformation.CreationDate = DateTime.Now;
pdfDoc.DocumentInformation.ModificationDate = DateTime.Now;
//Save the document
pdfDoc.Save("DocumentInformation.pdf");
pdfDoc.Close(true);
'Create a new document.
Dim pdfDoc As PdfDocument = New PdfDocument()
'Create a new page
Dim page As PdfPage = pdfDoc.Pages.Add()
'Set the document`s information.
pdfDoc.DocumentInformation.Title = "Document Properties Information"
pdfDoc.DocumentInformation.Author = "Syncfusion"
pdfDoc.DocumentInformation.Keywords = "PDF"
pdfDoc.DocumentInformation.Subject = "PDF demo"
pdfDoc.DocumentInformation.Producer = "Syncfusion Software"
' Sets the documents creator information
pdfDoc.DocumentInformation.Creator = "Essential PDF"
pdfDoc.DocumentInformation.CreationDate = DateTime.Now
pdfDoc.DocumentInformation.ModificationDate = DateTime.Now
'Save the document
pdfDoc.Save("DocumentInformation.pdf")
pdfDoc.Close(True)
See Also
CustomMetadata
Class CusotmMetadata used for add CustomMetadata to PDFDictionry Remove CustomMetadata values Modify CustomMetadata values Add CustomMetadata values
Declaration
public CustomMetadata CustomMetadata { get; set; }
Property Value
Type |
---|
CustomMetadata |
Keywords
Gets or sets the keywords.
Declaration
public string Keywords { get; set; }
Property Value
Type | Description |
---|---|
System.String | The keywords. |
Examples
//Create a new document.
PdfDocument pdfDoc= new PdfDocument();
//Creates a new page
PdfPage page = pdfDoc.Pages.Add();
//Set the Document`s properties.
pdfDoc.DocumentInformation.Title = "Document Properties Information";
pdfDoc.DocumentInformation.Author = "Syncfusion";
pdfDoc.DocumentInformation.Keywords = "PDF";
pdfDoc.DocumentInformation.Subject = "PDF demo";
pdfDoc.DocumentInformation.Producer = "Syncfusion Software";
pdfDoc.DocumentInformation.CreationDate = DateTime.Now;
//Sets the modification date
pdfDoc.DocumentInformation.ModificationDate = DateTime.Now;
//Save the document
pdfDoc.Save("DocumentInformation.pdf");
pdfDoc.Close(true);
'Create a new document.
Dim pdfDoc As PdfDocument= New PdfDocument()
'Create a new page
Dim page As PdfPage = pdfDoc.Pages.Add()
'set the Document`s properties.
pdfDoc.DocumentInformation.Title = "Document Properties Information"
pdfDoc.DocumentInformation.Author = "Syncfusion"
pdfDoc.DocumentInformation.Keywords = "PDF"
pdfDoc.DocumentInformation.Subject = "PDF demo"
pdfDoc.DocumentInformation.Producer = "Syncfusion Software"
pdfDoc.DocumentInformation.CreationDate = DateTime.Now
'Sets the modification date
pdfDoc.DocumentInformation.ModificationDate = DateTime.Now
'Save the document
pdfDoc.Save("DocumentInformation.pdf")
pdfDoc.Close(True)
See Also
Language
Gets or sets the Language.
Declaration
public string Language { get; set; }
Property Value
Type | Description |
---|---|
System.String | The Language. |
Examples
//Create a new document.
PdfDocument pdfDoc= new PdfDocument();
//Creates a new page
PdfPage page = pdfDoc.Pages.Add();
//Set the Document`s properties.
pdfDoc.DocumentInformation.Title = "Document Properties Information";
pdfDoc.DocumentInformation.Language = "En-Us";
pdfDoc.DocumentInformation.Author = "Syncfusion";
pdfDoc.DocumentInformation.Keywords = "PDF";
pdfDoc.DocumentInformation.Subject = "PDF demo";
pdfDoc.DocumentInformation.Producer = "Syncfusion Software";
pdfDoc.DocumentInformation.CreationDate = DateTime.Now;
//Sets the modification date
pdfDoc.DocumentInformation.ModificationDate = DateTime.Now;
//Save the document
pdfDoc.Save("DocumentInformation.pdf");
pdfDoc.Close(true);
'Create a new document.
Dim pdfDoc As PdfDocument= New PdfDocument()
'Create a new page
Dim page As PdfPage = pdfDoc.Pages.Add()
'set the Document`s properties.
pdfDoc.DocumentInformation.Title = "Document Properties Information"
pdfDoc.DocumentInformation.Language = "En-Us"
pdfDoc.DocumentInformation.Author = "Syncfusion"
pdfDoc.DocumentInformation.Keywords = "PDF"
pdfDoc.DocumentInformation.Subject = "PDF demo"
pdfDoc.DocumentInformation.Producer = "Syncfusion Software"
pdfDoc.DocumentInformation.CreationDate = DateTime.Now
'Sets the modification date
pdfDoc.DocumentInformation.ModificationDate = DateTime.Now
'Save the document
pdfDoc.Save("DocumentInformation.pdf")
pdfDoc.Close(True)
See Also
ModificationDate
Gets or sets the modification date.
Declaration
public DateTime ModificationDate { get; set; }
Property Value
Type | Description |
---|---|
System.DateTime | The System.DateTime. |
Examples
//Create a new document.
PdfDocument pdfDoc= new PdfDocument();
//Creates a new page
PdfPage page = pdfDoc.Pages.Add();
//Set the Document`s properties.
pdfDoc.DocumentInformation.Title = "Document Properties Information";
pdfDoc.DocumentInformation.Author = "Syncfusion";
pdfDoc.DocumentInformation.Keywords = "PDF";
pdfDoc.DocumentInformation.Subject = "PDF demo";
pdfDoc.DocumentInformation.Producer = "Syncfusion Software";
pdfDoc.DocumentInformation.CreationDate = DateTime.Now;
//Sets the modification date
pdfDoc.DocumentInformation.ModificationDate = DateTime.Now;
//Save the document
pdfDoc.Save("DocumentInformation.pdf");
pdfDoc.Close(true);
'Create a new document.
Dim pdfDoc As PdfDocument= New PdfDocument()
'Create a new page
Dim page As PdfPage = pdfDoc.Pages.Add()
'set the Document`s properties.
pdfDoc.DocumentInformation.Title = "Document Properties Information"
pdfDoc.DocumentInformation.Author = "Syncfusion"
pdfDoc.DocumentInformation.Keywords = "PDF"
pdfDoc.DocumentInformation.Subject = "PDF demo"
pdfDoc.DocumentInformation.Producer = "Syncfusion Software"
pdfDoc.DocumentInformation.CreationDate = DateTime.Now
'Sets the modification date
pdfDoc.DocumentInformation.ModificationDate = DateTime.Now
'Save the document
pdfDoc.Save("DocumentInformation.pdf")
pdfDoc.Close(True)
See Also
Producer
If the document was converted to PDF from another format, the name of the application (for example, Acrobat Distiller) that converted it to PDF.
Declaration
public string Producer { get; set; }
Property Value
Type | Description |
---|---|
System.String | The producer of the document. |
Examples
//Create a new document
PdfDocument pdfDoc = new PdfDocument();
//Creates a new page and adds it as the last page of the document
PdfPage page = pdfDoc.Pages.Add();
//Set the document`s information
pdfDoc.DocumentInformation.Title = "Document Properties Information";
pdfDoc.DocumentInformation.Author = "Syncfusion";
pdfDoc.DocumentInformation.Keywords = "PDF";
pdfDoc.DocumentInformation.Subject = "PDF demo";
pdfDoc.DocumentInformation.Producer = "Syncfusion Software";
// Sets the documents creator information
pdfDoc.DocumentInformation.Creator = "Essential PDF";
pdfDoc.DocumentInformation.CreationDate = DateTime.Now;
pdfDoc.DocumentInformation.ModificationDate = DateTime.Now;
//Save the document
pdfDoc.Save("DocumentInformation.pdf");
pdfDoc.Close(true);
'Create a new document.
Dim pdfDoc As PdfDocument = New PdfDocument()
'Create a new page
Dim page As PdfPage = pdfDoc.Pages.Add()
'Set the document`s information.
pdfDoc.DocumentInformation.Title = "Document Properties Information"
pdfDoc.DocumentInformation.Author = "Syncfusion"
pdfDoc.DocumentInformation.Keywords = "PDF"
pdfDoc.DocumentInformation.Subject = "PDF demo"
pdfDoc.DocumentInformation.Producer = "Syncfusion Software"
' Sets the documents creator information
pdfDoc.DocumentInformation.Creator = "Essential PDF"
pdfDoc.DocumentInformation.CreationDate = DateTime.Now
pdfDoc.DocumentInformation.ModificationDate = DateTime.Now
'Save the document
pdfDoc.Save("DocumentInformation.pdf")
pdfDoc.Close(True)
See Also
Subject
Gets or sets the subject.
Declaration
public string Subject { get; set; }
Property Value
Type | Description |
---|---|
System.String | The subject. |
Examples
//Create a new document.
PdfDocument pdfDoc= new PdfDocument();
//Creates a new page
PdfPage page = pdfDoc.Pages.Add();
//Set the Document`s properties.
pdfDoc.DocumentInformation.Title = "Document Properties Information";
pdfDoc.DocumentInformation.Author = "Syncfusion";
pdfDoc.DocumentInformation.Keywords = "PDF";
pdfDoc.DocumentInformation.Subject = "PDF demo";
pdfDoc.DocumentInformation.Producer = "Syncfusion Software";
pdfDoc.DocumentInformation.CreationDate = DateTime.Now;
//Sets the modification date
pdfDoc.DocumentInformation.ModificationDate = DateTime.Now;
//Save the document
pdfDoc.Save("DocumentInformation.pdf");
pdfDoc.Close(true);
'Create a new document.
Dim pdfDoc As PdfDocument= New PdfDocument()
'Create a new page
Dim page As PdfPage = pdfDoc.Pages.Add()
'set the Document`s properties.
pdfDoc.DocumentInformation.Title = "Document Properties Information"
pdfDoc.DocumentInformation.Author = "Syncfusion"
pdfDoc.DocumentInformation.Keywords = "PDF"
pdfDoc.DocumentInformation.Subject = "PDF demo"
pdfDoc.DocumentInformation.Producer = "Syncfusion Software"
pdfDoc.DocumentInformation.CreationDate = DateTime.Now
'Sets the modification date
pdfDoc.DocumentInformation.ModificationDate = DateTime.Now
'Save the document
pdfDoc.Save("DocumentInformation.pdf")
pdfDoc.Close(True)
See Also
Title
Gets or sets the title.
Declaration
public string Title { get; set; }
Property Value
Type | Description |
---|---|
System.String | The title. |
Examples
//Create a new document.
PdfDocument pdfDoc= new PdfDocument();
//Creates a new page
PdfPage page = pdfDoc.Pages.Add();
//Set the Document`s properties.
pdfDoc.DocumentInformation.Title = "Document Properties Information";
pdfDoc.DocumentInformation.Author = "Syncfusion";
pdfDoc.DocumentInformation.Keywords = "PDF";
pdfDoc.DocumentInformation.Subject = "PDF demo";
pdfDoc.DocumentInformation.Producer = "Syncfusion Software";
pdfDoc.DocumentInformation.CreationDate = DateTime.Now;
//Sets the modification date
pdfDoc.DocumentInformation.ModificationDate = DateTime.Now;
//Save the document
pdfDoc.Save("DocumentInformation.pdf");
pdfDoc.Close(true);
'Create a new document.
Dim pdfDoc As PdfDocument= New PdfDocument()
'Create a new page
Dim page As PdfPage = pdfDoc.Pages.Add()
'set the Document`s properties.
pdfDoc.DocumentInformation.Title = "Document Properties Information"
pdfDoc.DocumentInformation.Author = "Syncfusion"
pdfDoc.DocumentInformation.Keywords = "PDF"
pdfDoc.DocumentInformation.Subject = "PDF demo"
pdfDoc.DocumentInformation.Producer = "Syncfusion Software"
pdfDoc.DocumentInformation.CreationDate = DateTime.Now
'Sets the modification date
pdfDoc.DocumentInformation.ModificationDate = DateTime.Now
'Save the document
pdfDoc.Save("DocumentInformation.pdf")
pdfDoc.Close(True)
See Also
XmpMetadata
Gets Xmp metadata of the document.
Declaration
public XmpMetadata XmpMetadata { get; }
Property Value
Type | Description |
---|---|
XmpMetadata | Represents the document information in Xmp format. |
Remarks
This property is not supported in WinRT, Windows Phone, Xamarin, Universal Windows Platform and Silverlight
Examples
PdfDocument pdfDoc = new PdfDocument();
PdfPage page = pdfDoc.Pages.Add();
// Get xmp object.
XmpMetadata xmp = pdfDoc.DocumentInformation.XmpMetadata;
// XMP Basic Schema.
BasicSchema basic = xmp.BasicSchema;
basic.Advisory.Add("advisory");
basic.BaseURL = new Uri("http://google.com");
basic.CreateDate = DateTime.Now;
basic.CreatorTool = "creator tool";
basic.Identifier.Add("identifier");
basic.Label = "label";
basic.MetadataDate = DateTime.Now;
basic.ModifyDate = DateTime.Now;
basic.Nickname = "nickname";
basic.Rating.Add(-25);
pdfDoc.Save("DocumentInformation.pdf");
pdfDoc.Close(true);
Dim pdfDoc As PdfDocument = New PdfDocument()
Dim page As PdfPage = pdfDoc.Pages.Add()
' Get xmp object.
Dim xmp As XmpMetadata = pdfDoc.DocumentInformation.XmpMetadata
' XMP Basic Schema.
Dim basic As BasicSchema = xmp.BasicSchema
basic.Advisory.Add("advisory")
basic.BaseURL = New Uri("http://google.com")
basic.CreateDate = DateTime.Now
basic.CreatorTool = "creator tool"
basic.Identifier.Add("identifier")
basic.Label = "label"
basic.MetadataDate = DateTime.Now
basic.ModifyDate = DateTime.Now
basic.Nickname = "nickname"
basic.Rating.Add(-25)
pdfDoc.Save("DocumentInformation.pdf")
pdfDoc.Close(True)
Methods
Remove(String)
Remove a specified key from the document information in a PDF document.
Declaration
public bool Remove(string key)
Parameters
Type | Name | Description |
---|---|---|
System.String | key |
Returns
Type |
---|
System.Boolean |
Examples
//Load the existing PDF document.
PdfLoadedDocument document = new PdfLoadedDocument("input.pdf");
//Remove the document information properties.
document.DocumentInformation.Remove("Title");
document.DocumentInformation.Remove("Author");
document.DocumentInformation.Remove("Subject");
document.DocumentInformation.Remove("Keywords");
document.DocumentInformation.Remove("Creator");
document.DocumentInformation.Remove("Producer");
document.DocumentInformation.Remove("ModDate");
document.DocumentInformation.Remove("CreationDate");
//Save the document
document.Save("DocumentInformation.pdf");
document.Close(true);
RemoveModificationDate()
Remove the modification date from existing document.
Declaration
public void RemoveModificationDate()