Back to Devexpress

AdobePdfProperties Class

officefileapi-devexpress-dot-pdf-dot-xmp-01b04677.md

latest2.9 KB
Original Source

AdobePdfProperties Class

Contains members used to define the Adobe PDF namespace.

Namespace : DevExpress.Pdf.Xmp

Assembly : DevExpress.Pdf.v25.2.Core.dll

NuGet Package : DevExpress.Pdf.Core

Declaration

csharp
public class AdobePdfProperties
vb
Public Class AdobePdfProperties

The following members return AdobePdfProperties objects:

Remarks

The Adobe PDF namespace specifies properties used in Adobe PDF documents. The namespace URI is http://ns.adobe.com/pdf/1.3/, the preferred prefix is pdf.

Example

The code sample below adds items from the Adobe PDF schema to the packet:

csharp
using DevExpress.Pdf;
using DevExpress.Pdf.Xmp;
//...

using (PdfDocumentProcessor pdfDocumentProcessor = new PdfDocumentProcessor())
{
    // Load a document:
    pdfDocumentProcessor.LoadDocument("Documents//Invoice.pdf");
    PdfDocument document = pdfDocumentProcessor.Document;

    // Create a new XMP packet:
    XmpDocument metadata = new XmpDocument();

    AdobePdfProperties adobePdfProperties = metadata.PdfProperties;
    adobePdfProperties.Keywords = "Invoice, Northwind, PDF, XMP";
    adobePdfProperties.PDFVersion = "1.3";
    adobePdfProperties.Producer = "PDF Document API";
    adobePdfProperties.Trapped = false;

    // Embed metadata in the document:
    document.SetMetadata(metadata);

    // Save the result:
    pdfDocumentProcessor.SaveDocument("Invoice_Upd.pdf");
}
vb
Imports DevExpress.Pdf
Imports DevExpress.Pdf.Xmp
'...

Using pdfDocumentProcessor As New PdfDocumentProcessor()
    ' Load a document:
    pdfDocumentProcessor.LoadDocument("Documents//Invoice.pdf")
    Dim document As PdfDocument = pdfDocumentProcessor.Document

    ' Create a new XMP packet:
    Dim metadata As New XmpDocument()

    Dim adobePdfProperties As AdobePdfProperties = metadata.PdfProperties
    adobePdfProperties.Keywords = "Invoice, Northwind, PDF, XMP"
    adobePdfProperties.PDFVersion = "1.3"
    adobePdfProperties.Producer = "PDF Document API"
    adobePdfProperties.Trapped = False

    ' Embed metadata in the document:
    document.SetMetadata(metadata)

    ' Save the result:
    pdfDocumentProcessor.SaveDocument("Invoice_Upd.pdf")
End Using

Inheritance

Object AdobePdfProperties

See Also

AdobePdfProperties Members

DevExpress.Pdf.Xmp Namespace