Document Metadata

<< Click to Display Table of Contents >>

Navigation:  EasyPDFMaker documentation > Getting started > Step by Step > Working with PDF file >

Document Metadata

Previous pageReturn to chapter overviewNext page

PDF documents can have various metadata associated with them, such as the title, or author of the document. You can add that information by adding it to the document definition

 

dd   TDocDefinition

 

 dd.AddDocInfo('title', 'awesome Document')

 dd.AddDocInfo('author', 'john doe')

 dd.AddDocInfo('subject', 'subject of document')

 dd.AddDocInfo('keywords', 'keywords for document')

 

 dd.BeginContent()

         dd.AddText('This is an sample PDF printed with EasyPdfMaker')

 dd.EndContent()

 

 

[=== compare with pdfMake:

var docDefinition = {

info: {

 title: 'awesome Document',

 author: 'john doe',

 subject: 'subject of document',

 keywords: 'keywords for document',

 },

content: 'This is an sample PDF printed with pdfMake'

}

===]

 

Standard properties:

 

title - the title of the document

author - the name of the author

subject - the subject of the document

keywords - keywords associated with the document

creator - the creator of the document (default is 'pdfmake')

producer - the producer of the document (default is 'pdfmake')

creationDate - the date the document was created (added automatically by pdfmake)

modDate - the date the document was last modified

trapped - the trapped flag in a PDF document indicates whether the document has been "trapped"

Custom properties:

 

You can add custom properties. Key of property not contain spaces.