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: 21.5.0

ExpandedSyntax

public enum PdfCustomPropertiesExport

ExpandedMembers

  Member nameValueDescription
None0 No custom properties are exported.
Standard1 Custom properties are exported as entries in /Info dictionary.

ExpandedRemarks

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

Metadata2 Custom properties are Metadata.

ExpandedExamples

Shows how to export custom properties while converting a document to PDF.
Document doc = new Document();

doc.CustomDocumentProperties.Add("Company", "My value");

// Create a "PdfSaveOptions" object that we can pass to the document's "Save" method
// to modify how that method converts the document to .PDF.
PdfSaveOptions options = new PdfSaveOptions();

// Set the "CustomPropertiesExport" property to "PdfCustomPropertiesExport.None" to discard
// custom document properties as we save the document to .PDF. 
// Set the "CustomPropertiesExport" property to "PdfCustomPropertiesExport.Standard"
// to preserve custom properties within the output PDF document.
// Set the "CustomPropertiesExport" property to "PdfCustomPropertiesExport.Metadata"
// to preserve custom properties in an XMP packet.
options.CustomPropertiesExport = pdfCustomPropertiesExportMode;

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

ExpandedSee Also