-
-
Notifications
You must be signed in to change notification settings - Fork 98
1.2.1 Metadata
We can add various bits of metadata in our document. For this purpose, we have to create an "Info" dictionary and refer to this object in the trailer dictionary to it with the name /Info
.
All entries of this dictionary are optional (some are required for PDF standards):
Name | Type | Example entry | Required? |
---|---|---|---|
Title | String | (My holiday journey) |
yes |
Author | String | (Mr. Bean) |
no |
Subject | String | (Holiday plans for July) |
no |
Keywords | String | (holiday plans canne) |
no |
Creator | String | (Adobe Indesign) |
no |
Producer | String | (printpdf v.0.5.0) |
no |
CreationDate | DateString | (D:20170705215328+02'00') |
yes |
ModDate | DateString | (D:20170705215328+02'00') |
yes |
Trapped | Boolean | true |
yes |
GTS_PDFXVersion | String | (PDF/X-3:2002) |
yes |
What DateString
refers to: The entry is still a PDF string, but in a spectial format:
D:%Y%m%d%H%M%S'%TZ'%tz
%TZ
and %tz
refer to the time zone as hours and minutes, respectively. These entries are only needed if the time is not in GMT. Some programs use this info to sort documents.
Please note that none of the above entries is required, they are only requried if you want to validate your PDF against a certain PDF standard.
Example:
1 0 obj
<<
/Title (Holiday plans)
/Author (Mr. Bean)
/Subject (After a won lottery, madman invades france)
/Keywords (cannes teddy holiday)
/Creator (MyPdfProgram)
/Producer (printpdf v.0.5.0)
/CreationDate (D:20110628115000+02'00')
/ModDate (D:20110628115000+02'00')
>>
trailer
<<
/Info 1 0 R
>>
Translated from http://www.p2501.ch/pdf-howto/start | Translation DE-EN: Felix Schütt