/** * PDF metadata reader. * * Extracts document metadata from: * 1. Info Dictionary (traditional metadata) * - Title, Author, Subject, Keywords, Creator, Producer * - CreationDate, ModDate * * 2. XMP Metadata Stream (XML-based, more comprehensive) * - All of the above plus: * - Dublin Core metadata, custom properties * * @see PDF Reference 1.7, ยง10.2 - Metadata * @see XMP Specification Part 1 */ import type { PdfDocument } from "./pdf-document.js"; /** * PDF document metadata. */ export interface PdfMetadata { /** Document title */ title: string; /** Document author */ author: string; /** Document subject */ subject: string; /** Document keywords */ keywords: string; /** Application that created the original document */ creator: string; /** Application that produced the PDF */ producer: string; /** Date the document was created */ creationDate: Date | null; /** Date the document was last modified */ modDate: Date | null; /** PDF version */ pdfVersion: string; /** Number of pages */ pageCount: number; /** Whether the document is encrypted */ encrypted: boolean; /** Page size of the first page (in points) */ pageSize: { width: number; height: number; } | null; /** Raw XMP metadata XML (if available) */ xmpXml: string | null; /** Additional custom metadata from Info dictionary */ custom: Record; } /** * Extract metadata from a PDF document. */ export declare function extractMetadata(doc: PdfDocument): PdfMetadata;