Summary of steps
To import XMP metadata into a PDF document, perform the following steps:
- Include project files.
- Create an XMPUtilityService client.
- 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
Import XMP metadata using the Java API
Import XMP metadata by using the XMP Utilities API (Java):
-
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. -
Create an XMPUtilityService client
Create an
XMPUtilityServiceClient
object by using its constructor and passing aServiceClientFactory
object that contains connection properties. -
Invoke the XMP metadata import operation
To modify the XMP metadata, invoke either the
XMPUtilityServiceClient
object’simportMetadata
method or itsimportXMP
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. - A
Importing XMP metadata using the web service API
To programmatically import XMP metadata using the XMP Utilities web service API, perform the following tasks:
-
Include project files
- Create a Microsoft .NET client assembly that consumes the XMP Utilities service WSDL file. (See Invoking AEM Forms using Base64 encoding.)
- Reference the Microsoft .NET client assembly. (See Creating a .NET client assembly that uses Base64 encoding.)
-
Create an XMPUtilityService client
Create an
XMPUtilityServiceService
object by using your proxy class constructor. -
Invoke the XMP metadata import operation
To modify the XMP metadata, invoke either the
XMPUtilityServiceService
object’simportMetadata
method or itsimportXMP
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. - A
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.
Summary of steps
To export XMP metadata from a PDF document, perform the following steps:
- Include project files.
- Create an XMPUtilityService client.
- 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
Export XMP metadata using the Java API
Export XMP metadata by using the XMP Utilities API (Java):
-
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. -
Create an XMPUtilityService client
Create an
XMPUtilityServiceClient
object by using its constructor and passing aServiceClientFactory
object that contains connection properties. -
Invoke the XMP metadata import operation
To inspect the XMP metadata, invoke the
XMPUtilityServiceClient
object’sexportMetadata
method and pass in acom.adobe.idp.Document
object that represents the PDF file. The method returns anXMPUtilityMetadata
object that contains the retrieved metadata.To retrieve and save the XMP metadata, invoke the
XMPUtilityServiceClient
object’sexportXMP
method and pass in acom.adobe.idp.Document
object that represents the PDF file. The method returns acom.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):
-
Include project files
- Create a Microsoft .NET client assembly that consumes the XMP Utilities service WSDL file.
- Reference the Microsoft .NET client assembly.
-
Create an XMPUtilityService client
Create an
XMPUtilityServiceService
object by using your proxy class constructor. -
Invoke the XMP metadata import operation
To inspect the XMP metadata, invoke the
XMPUtilityServiceClient
object’sexportMetadata
method and pass in aBLOB
object that represents the PDF file. The method returns anXMPUtilityMetadata
object that contains the retrieved metadata.To retrieve and save the XMP metadata, invoke the
XMPUtilityServiceClient
object’sexportXMP
method and pass in aBLOB
object that represents the PDF file. The method returns aBLOB
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.
RegisterPut the Customer at the Center and Build Relationships That Last a Lifetime
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)
The True Cost of a Failed Implementation
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)
Connect with Experience League at Summit!
Get front-row access to top sessions, hands-on activities, and networking—wherever you are!
Learn more