Aspose::Words::Saving::PdfSaveOptions::get_CustomPropertiesExport method
Contents
[
Hide
]PdfSaveOptions::get_CustomPropertiesExport method
Gets or sets a value determining the way CustomDocumentProperties are exported to PDF file.
Aspose::Words::Saving::PdfCustomPropertiesExport Aspose::Words::Saving::PdfSaveOptions::get_CustomPropertiesExport() const
Remarks
Default value is None.
Metadata value is not supported when saving to PDF/A. Standard will be used instead for PDF/A-1 and PDF/A-2 and None for PDF/A-4.
Standard value is not supported when saving to PDF 2.0. Metadata will be used instead.
Examples
Shows how to export custom properties while converting a document to PDF.
auto doc = MakeObject<Document>();
doc->get_CustomDocumentProperties()->Add(u"Company", String(u"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.
auto options = MakeObject<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->set_CustomPropertiesExport(pdfCustomPropertiesExportMode);
doc->Save(ArtifactsDir + u"PdfSaveOptions.CustomPropertiesExport.pdf", options);
See Also
- Enum PdfCustomPropertiesExport
- Class PdfSaveOptions
- Namespace Aspose::Words::Saving
- Library Aspose.Words for C++