PeachPDF

PeachPDF

PdfDocumentMetadata Class

Optional document-information overrides applied to the generated PDF’s Info dictionary via Metadata. Each property is nullable: when a property is non-null it overrides the value extracted from the HTML source (<title> and the <meta name="author|subject|keywords|generator"> tags); when it is null the HTML-extracted value is used unchanged.

public sealed class PdfDocumentMetadata

Inheritance System.Object → PdfDocumentMetadata

Remarks

Document language is not set here — use DefaultLanguage, which populates the PDF catalog /Lang entry when the document itself declares no language (a document’s own <html lang> takes priority).

Properties  
Author Overrides the PDF document author (from <meta name="author">).
CreationDate Overrides the PDF document’s creation date. When non-null, wins over any date extracted from the HTML source; when null (the default), the HTML-extracted date is used unchanged. Required (directly or via a <meta> date in the source HTML) whenever an XMP metadata stream is written (EnableXmpMetadata or PdfAConformance) - xmp:CreateDate needs a real value, and generation throws rather than writing a default/placeholder date if neither is present.
Creator Overrides the PDF document creator (from <meta name="generator">).
CustomXmpProperties Arbitrary additional XMP metadata to include in the document’s XMP stream (see EnableXmpMetadata/PdfAConformance), beyond the built-in Dublin Core/pdf:/xmp: fields - e.g. an internal provenance or records-management schema. Each element is appended into the XMP packet as its own rdf:Description, using the element’s own namespace unchanged; accepting System.Xml.Linq.XElement rather than a raw XML string keeps the packet well-formed by construction. Has no effect unless an XMP stream is actually written for the render, in which case a non-empty collection here also forces one to be written even if EnableXmpMetadata is left false and PdfAConformance is None.
Keywords Overrides the PDF document keywords (from <meta name="keywords">).
Subject Overrides the PDF document subject (from <meta name="subject">).
Title Overrides the PDF document title (from <title>).