Document Metadata
Version 0.3 is under development. Do not use in a production.
Documentation is under development.
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
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 documentauthor
- the name of the authorsubject
- the subject of the documentkeywords
- keywords associated with the documentcreator
- 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 modifiedtrapped
- the trapped flag in a PDF document indicates whether the document has been “trapped”, i.e. corrected for slight color misregistrations
Custom properties:
You can add custom properties. Key of property not contain spaces.
Document language
PDF document can have custom language set via language
property.
Example:
var docDefinition = {
language: 'cs-CZ'
content: 'Jednoduchý PDF dokument vytvoření pomocí pdfmake'
}