Expand description
Document-level metadata: the Info dict and the XMP metadata stream.
PDF documents carry author/title/etc. in two places:
- The trailer’s
/Infodict (legacy, present in nearly all PDFs). - The catalog’s
/Metadatastream (XMP XML, PDF 1.4+, increasingly the canonical form).
DocumentMetadata returns both: parsed Info-dict fields plus the raw
XMP XML for callers that want to consume it themselves.
Date strings come in PDF’s own format (D:YYYYMMDDHHmmSSOHH'mm'); we
parse them into a typed PdfDate.
Structs§
- Document
Metadata - Information about a PDF document, drawn from the trailer’s
/Infodict and the catalog’s/Metadatastream. - PdfDate
- A parsed PDF date string.
Enums§
- Trapped
Flag /Trappedflag value.
Functions§
- parse_
document_ metadata - Parse the trailer’s
/Infodict and the catalog’s/Metadatastream into aDocumentMetadata.