DocumentXmpMetadata

This class allows you to modify a PDF documents metadata.

Metadata is defined in two ways in the PDF spec (§ 14.3): - A metadata stream containing XMP data. This class is handling this. (https://en.wikipedia.org/wiki/Extensible_Metadata_Platform) - The Info PDF dictionary. See DocumentPdfMetadata.

Use getXmpMetadata to retrieve an instance of this class.

See also

Properties

Link copied to clipboard
val XMP_DC_NAMESPACE: String = "http://purl.org/dc/elements/1.1/"
Specifies the default Adobe DC namespace
Link copied to clipboard
Specifies the default Adobe DC namespace prefix
Link copied to clipboard
val XMP_PDF_NAMESPACE: String = "http://ns.adobe.com/pdf/1.3/"
Specifies the default Adobe PDF namespace
Link copied to clipboard
Specifies the default Adobe PDF namespace prefix

Functions

Link copied to clipboard
abstract fun get(@NonNull key: String, @NonNull xmlNamespace: String): PdfValue
Retrieves a single metadata value from the XMP metadata entries included in the PDF file.
Link copied to clipboard
abstract fun hasUnsavedChanges(): Boolean
Returns true if there were any changes to the XMP metadata without save.
Link copied to clipboard
abstract fun set(@NonNull key: String, @Nullable value: String, @NonNull namespace: String, @NonNull namespacePrefix: String)
Sets a single metadata value inside the XMP metadata structure in PDF.