Click or drag to resize

PdfDocumentGenerateMetadata Method

Generates and populates the XMP (Extensible Metadata Platform) XML metadata for a PDF document, ensuring compliance with PDF/A standards and optionally Factur-X (ZUGFeRD) electronic invoicing.

Namespace: Patagames.Pdf.Net
Assembly: Patagames.Pdf (in Patagames.Pdf.dll) Version: 4.111.2704
Syntax
public void GenerateMetadata(
	string title,
	string author,
	string subject,
	string producer,
	string keywords,
	string creator,
	DateTimeOffset? creationDate,
	DateTimeOffset? modificationDate,
	string pdfAPart,
	string pdfAConformance,
	FacturXProfile? facturXProfile,
	string facturXVer
)

Parameters

title  String
The title of the document. Maps to dc:title.
author  String
The name of the person or organization that created the document. Maps to dc:creator.
subject  String
The subject of the document. Maps to dc:description.
producer  String
The name of the application that converted the document to PDF. Maps to pdf:Producer.
keywords  String
Keywords associated with the document. Maps to pdf:Keywords.
creator  String
The name of the application that created the original document. Maps to xmp:CreatorTool.
creationDate  NullableDateTimeOffset
The date and time the document was created.
modificationDate  NullableDateTimeOffset
The date and time the document was last modified.
pdfAPart  String
The PDF/A version part (e.g., "1", "2", or "3"). Maps to pdfaid:part.
pdfAConformance  String
The PDF/A conformance level (e.g., "A", "B", or "U"). Maps to pdfaid:conformance.
facturXProfile  NullableFacturXProfile
The Factur-X / ZUGFeRD conformance profile. If provided, adds invoice-specific metadata.
facturXVer  String
The version of the Factur-X standard. Defaults to "1.0" if null.
Remarks
This method performs two primary actions:
  1. Synchronizes the provided values with the document's internal Info Dictionary (Title, Author, etc.).
  2. Constructs a well-formed XMP XML packet, including Dublin Core (dc), Adobe PDF (pdf), XMP Basic (xmp), and PDF/A Identification (pdfaid) namespaces.
If facturXProfile is specified, the method injects the required ZUGFeRD extension schema to identify the PDF as an electronic invoice.
See Also