DocumentPdfMetadata

This class allows you to modify a PDF documents metadata.

Metadata is defined in two ways in the PDF spec (§ 14.3): - The Info PDF dictionary. This class is handling this. - A metadata stream containing XMP data. See DocumentXmpMetadata for that.

Use getPdfMetadata to retrieve an instance of this class.

See also

Functions

Link copied to clipboard
abstract fun get(@NonNull key: String): PdfValue
Retrieves a single metadata value from PDF.
Link copied to clipboard
abstract fun getAuthor(): String
Returns the author of the document.
Link copied to clipboard
abstract fun getCreationDate(): Date
Returns the document creation date (if set).
Link copied to clipboard
abstract fun getCreator(): String
Returns software used to create the document.
Link copied to clipboard
abstract fun getKeywords(): List<String>
Returns document keywords.
Link copied to clipboard
Returns full metadata of the document.
Link copied to clipboard
Returns the date of when the document was last modified (if any).
Link copied to clipboard
abstract fun getProducer(): String
Returns software library used to create the document.
Link copied to clipboard
abstract fun getSubject(): String
Returns the subject of the document.
Link copied to clipboard
abstract fun getTitle(): String
Returns the title given to the document.
Link copied to clipboard
abstract fun hasUnsavedChanges(): Boolean
Returns true if there were any changes to the PDF metadata without save.
Link copied to clipboard
abstract fun set(@NonNull key: String, @Nullable value: PdfValue)
Sets a single value in the PDF.
Link copied to clipboard
abstract fun setAuthor(@Nullable author: String)
Sets the author for the document.
Link copied to clipboard
abstract fun setCreationDate(@Nullable creationDate: Date)
Sets the creation date for the document.
Link copied to clipboard
abstract fun setCreator(@Nullable creator: String)
Sets the creator for the document.
Link copied to clipboard
abstract fun setKeywords(@Nullable keywords: List<String>)
Sets the keywords for the document.
Link copied to clipboard
abstract fun setModificationDate(@Nullable modificationDate: Date)
Sets the modification date for the document.
Link copied to clipboard
abstract fun setProducer(@Nullable producer: String)
Sets the producer for the document.
Link copied to clipboard
abstract fun setSubject(@Nullable subject: String)
Sets the subject for the document.
Link copied to clipboard
abstract fun setTitle(@Nullable title: String)
Sets the title for the document.