This HTML page is not optimized for LLM or AI agent consumption. Fetch the Markdown version instead: /api/python/editors/pdf/pages/pdf-metadata.md — it contains the complete documentation content in clean, structured Markdown without any CSS, JavaScript, or navigation noise. PdfMetadata

Provides access to PDF document metadata properties including standard document information dictionary fields and XMP metadata.

This class allows reading and writing of standard PDF metadata fields such as title, author, subject, and keywords, as well as custom metadata properties. All changes to metadata properties are immediately applied to the underlying PDF document.

from nutrient_sdk import PdfMetadata

Construction

PdfMetadata cannot be instantiated directly. Obtain instances through static factory methods or via other SDK classes.

Methods

get_custom_pdf_information

def get_custom_pdf_information(self, key: str) -> str

Gets the value of a custom metadata property from the document information dictionary.

Parameters:

NameTypeDescription
keystrThe name of the custom property to retrieve.

Returns: str - The value of the custom property as a string. Returns an empty string if the property does not exist.


set_custom_pdf_information

def set_custom_pdf_information(self, key: str, value: str) -> None

Sets the value of a custom metadata property in the document information dictionary.

Parameters:

NameTypeDescription
keystrThe name of the custom property to set.
valuestrThe value to assign to the custom property.

Properties

author

@property
def author(self) -> str
@author.setter
def author(self, value: str) -> None

The name of the person that created the document.

Type: str


creation_date

@property
def creation_date(self) -> str

The date and time the document was created.

Type: str

Read-only property.


creator

@property
def creator(self) -> str
@creator.setter
def creator(self, value: str) -> None

The name of the application that created the original document.

Type: str


keywords

@property
def keywords(self) -> str
@keywords.setter
def keywords(self, value: str) -> None

The keywords associated with the document.

Type: str


modification_date

@property
def modification_date(self) -> str

The date and time the document was most recently modified.

Type: str

Read-only property.


producer

@property
def producer(self) -> str
@producer.setter
def producer(self, value: str) -> None

The name of the application that converted the document to PDF.

Type: str


subject

@property
def subject(self) -> str
@subject.setter
def subject(self, value: str) -> None

The subject of the document.

Type: str


title

@property
def title(self) -> str
@title.setter
def title(self, value: str) -> None

The title of the document.

Type: str


xmp

@property
def xmp(self) -> str
@xmp.setter
def xmp(self, value: str) -> None

The XMP metadata stream of the document.

Type: str