Can the Adobe PDF Library modify or edit PDF document metadata properties?
Estimated Reading Time: 1 MinutesYou can retrieve and modify document properties for a PDF document located in the Document Information Dictionary.
The properties stored in the Document Information Dictionary are presented as a series of name/string couplets, each one a key with a value. Many of these properties are defined by the specification, although you can create custom PDF properties for the Document Information Dictionary for internal use. See Section 14.3.3, “Document Information Dictionary,” in the ISO 32000 Reference.
If you know the name of the key for the property you are looking for, you can use either of these methods to obtain the value associated with that key:
PDDocGetInfo() or PDDocGetInfoASText()
Properties can be set via PDDocSetInfo() or PDDocSetInfoAsASText(). See the AddDocumentInformation sample.
Alternatively, if you obtain the Document Information Dictionary as a COS object using CosDocGetInfoDict(PDDocGetCosDoc()), you may then enumerate this dictionary to find all of the properties and values.
Note also that the XMP metadata can be retrieved and set with PDDocGetXAPMetadataProperty()and PDDocSetXAPMetadataProperty() respectively.