 | 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.NetAssembly: Patagames.Pdf (in Patagames.Pdf.dll) Version: 4.111.2704
Syntaxpublic 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
)
Public Sub GenerateMetadata (
title As String,
author As String,
subject As String,
producer As String,
keywords As String,
creator As String,
creationDate As DateTimeOffset?,
modificationDate As DateTimeOffset?,
pdfAPart As String,
pdfAConformance As String,
facturXProfile As FacturXProfile?,
facturXVer As String
)
public:
void GenerateMetadata(
String^ title,
String^ author,
String^ subject,
String^ producer,
String^ keywords,
String^ creator,
Nullable<DateTimeOffset> creationDate,
Nullable<DateTimeOffset> modificationDate,
String^ pdfAPart,
String^ pdfAConformance,
Nullable<FacturXProfile> facturXProfile,
String^ facturXVer
)
member GenerateMetadata :
title : string *
author : string *
subject : string *
producer : string *
keywords : string *
creator : string *
creationDate : Nullable<DateTimeOffset> *
modificationDate : Nullable<DateTimeOffset> *
pdfAPart : string *
pdfAConformance : string *
facturXProfile : Nullable<FacturXProfile> *
facturXVer : string -> unit 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
)
function GenerateMetadata(title, author, subject, producer, keywords, creator, creationDate, modificationDate, pdfAPart, pdfAConformance, facturXProfile, 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:
-
Synchronizes the provided values with the document's internal Info Dictionary (Title, Author, etc.).
-
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