Summary of steps

To import XMP metadata into a PDF document, perform the following steps:

  1. Include project files.
  2. Create an XMPUtilityService client.
  3. Invoke the XMP metadata import operation.

Include project files

Include necessary files into your development project. If you are creating a client application using Java, include the necessary JAR files. If you are using web services, ensure that you include the proxy files.

Create an XMPUtilityService client

Before you can programmatically perform an XMP Utilities operation, you must create an XMPUtilityService client. With the Java API, this is accomplished by creating an XMPUtilityServiceClient object. With the web service API, this is accomplished by using an XMPUtilityServiceService object.

Invoke the XMP metadata import operation

After you create the service client, you can invoke one of the XMP metadata import operations to import the XMP metadata into the specified PDF document.

See also

Import XMP metadata using the Java API

Importing XMP metadata using the web service API

Including AEM Forms Java library files

Setting connection properties

Import XMP metadata using the Java API

Import XMP metadata by using the XMP Utilities API (Java):

  1. Include project files

    Include client JAR files, such as adobe-pdfutility-client.jar, in your Java project’s class path.

    NOTE
    The adobe-pdfutility-client.jar file contains classes that enable you to programmatically invoke the XMP Utilities service.
  2. Create an XMPUtilityService client

    Create an XMPUtilityServiceClient object by using its constructor and passing a ServiceClientFactory object that contains connection properties.

  3. Invoke the XMP metadata import operation

    To modify the XMP metadata, invoke either the XMPUtilityServiceClient object’s importMetadata method or its importXMP method.

    If you use the importMetadata method, pass in the following values:

    • A com.adobe.idp.Document object that represents the PDF file.
    • An XMPUtilityMetadata object that contains the metadata to be imported.

    If you use the importXMP method, pass in the following values:

    • A com.adobe.idp.Document object that represents the PDF file.
    • A com.adobe.idp.Document object that represents an XML file that contains the metadata to be imported.

    In either case, the returned value is a com.adobe.idp.Document object that represents the PDF file with the newly imported metadata. You can then save this object to disk.

Importing XMP metadata using the web service API

To programmatically import XMP metadata using the XMP Utilities web service API, perform the following tasks:

  1. Include project files

  2. Create an XMPUtilityService client

    Create an XMPUtilityServiceService object by using your proxy class constructor.

  3. Invoke the XMP metadata import operation

    To modify the XMP metadata, invoke either the XMPUtilityServiceService object’s importMetadata method or its importXMP method.

    If you use the importMetadata method, pass in the following values:

    • A BLOB object that represents the PDF file.
    • An XMPUtilityMetadata object that contains the metadata to be imported.

    If you use the importXMP method, pass in the following values:

    • A BLOB object that represents the PDF file.
    • A BLOB object that represents an XML file that contains the metadata to be imported.

    In either case, the returned value is a BLOB object that represents the PDF file with the newly imported metadata. You can then save this object to disk.

Exporting Metadata from PDF Documents

You can use the XMP Utilities Java and web service APIs to programmatically retrieve and save XMP metadata from a PDF document.

NOTE
For more information about the XMP Utilities service, see Services Reference for AEM Forms.

Summary of steps

To export XMP metadata from a PDF document, perform the following steps:

  1. Include project files.
  2. Create an XMPUtilityService client.
  3. Invoke the XMP metadata export operation.

Include project files

Include necessary files into your development project. If you are creating a client application using Java, include the necessary JAR files. If you are using web services, ensure that you include the proxy files.

Create an XMPUtilityService client

Before you can programmatically perform an XMP Utilities operation, you must create an XMPUtilityService client. With the Java AP,I this is accomplished by creating an XMPUtilityServiceClient object. With the web service API, this is accomplished using an XMPUtilityServiceService object.

Invoke the XMP metadata export operation

After you create the service client, you can invoke one of the XMP metadata export operations, which can be used to inspect the XMP metadata or save it to disk.

See also

Import XMP metadata using the Java API

Importing XMP metadata using the web service API

Including AEM Forms Java library files

Setting connection properties

Export XMP metadata using the Java API

Export XMP metadata by using the XMP Utilities API (Java):

  1. Include project files

    Include client JAR files, such as adobe-pdfutility-client.jar, in your Java project’s class path.

    NOTE
    The adobe-pdfutility-client.jar file contains classes that enable you to programmatically invoke the XMP Utility service.
  2. Create an XMPUtilityService client

    Create an XMPUtilityServiceClient object by using its constructor and passing a ServiceClientFactory object that contains connection properties.

  3. Invoke the XMP metadata import operation

    To inspect the XMP metadata, invoke the XMPUtilityServiceClient object’s exportMetadata method and pass in a com.adobe.idp.Document object that represents the PDF file. The method returns an XMPUtilityMetadata object that contains the retrieved metadata.

    To retrieve and save the XMP metadata, invoke the XMPUtilityServiceClient object’s exportXMP method and pass in a com.adobe.idp.Document object that represents the PDF file. The method returns a com.adobe.idp.Document object that contains the retrieved metadata, which you can subsequently save to disk as an XML file.

Export XMP metadata using the web service API

Export XMP metadata by using the XMP Utilities API (web service):

  1. Include project files

    • Create a Microsoft .NET client assembly that consumes the XMP Utilities service WSDL file.
    • Reference the Microsoft .NET client assembly.
  2. Create an XMPUtilityService client

    Create an XMPUtilityServiceService object by using your proxy class constructor.

  3. Invoke the XMP metadata import operation

    To inspect the XMP metadata, invoke the XMPUtilityServiceClient object’s exportMetadata method and pass in a BLOB object that represents the PDF file. The method returns an XMPUtilityMetadata object that contains the retrieved metadata.

    To retrieve and save the XMP metadata, invoke the XMPUtilityServiceClient object’s exportXMP method and pass in a BLOB object that represents the PDF file. The method returns a BLOB object that contains the retrieved metadata, which you can subsequently save to disk as an XML file.

Experience Manager


Espressos & Experience Manager: AEM Forms

Espressos & Experience Manager

Thursday, Mar 6, 7:00 PM UTC

Join Adobe's AEM product team as they highlight AEM Forms' latest innovations, including: the new Gen AI Assistant, Unified Composition with AEM Sites, and new ways to deploy forms through conversations.

Register

Put the Customer at the Center and Build Relationships That Last a Lifetime

Online | Strategy Keynote | General Audience

First impressions last a lifetime. Great first impressions feel personal, connected, and relevant right from the start. From the first...

Wed, Mar 19, 2:30 PM PDT (9:30 PM UTC)

Register

The True Cost of a Failed Implementation

Online | Session | General Audience

A failed implementation isn’t just an inconvenience — it costs real revenue. Poor execution and misaligned tools disrupt pipelines,...

Wed, Mar 19, 2:00 PM PDT (9:00 PM UTC)

Register

Connect with Experience League at Summit!

Get front-row access to top sessions, hands-on activities, and networking—wherever you are!

Learn more