Click or drag to resize

PdfCustomPropertiesExport Enumeration

Specifies the way CustomDocumentProperties are exported to PDF file.

Namespace:  Aspose.Words.Saving
Assembly:  Aspose.Words (in Aspose.Words.dll) Version: 20.3
Syntax
public enum PdfCustomPropertiesExport
Members
  Member nameValueDescription
None0 No custom properties are exported.
Standard1 Custom properties are exported as entries in /Info dictionary.
Remarks

Custom properties with the following names are not exported: "Title", "Author", "Subject", "Keywords", "Creator", "Producer", "CreationDate", "ModDate", "Trapped".

Metadata2 Custom properties are Metadata.
Remarks

The namespace of exported properties in XMP packet is "custprops". Every property has an associated xml-element "custprops:Property1", "custprops:Property2" and so on. There is "rdf:Description" element inside property element. The description element has two elements "custprops:Name", containing custom property's name as a value of this xml-element, and "custprops:Value", containing custom property's value as value of this xml-element.

Examples
Shows how to export custom properties while saving to .pdf.
Document doc = new Document();

// Add a custom document property that doesn't use the name of some built in properties
doc.CustomDocumentProperties.Add("Company", "My value");

// Configure the PdfSaveOptions like this will display the properties
// in the "Document Properties" menu of Adobe Acrobat Pro
PdfSaveOptions options = new PdfSaveOptions();
options.CustomPropertiesExport = PdfCustomPropertiesExport.Standard;

doc.Save(ArtifactsDir + "PdfSaveOptions.CustomPropertiesExport.pdf", options);
See Also