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
XMPUtilityServiceClientobject by using its constructor and passing aServiceClientFactoryobject that contains connection properties. -
Invoke the XMP metadata import operation
To modify the XMP metadata, invoke either the
XMPUtilityServiceClientobject’simportMetadatamethod or itsimportXMPmethod.If you use the
importMetadatamethod, pass in the following values:- A
com.adobe.idp.Documentobject that represents the PDF file. - An
XMPUtilityMetadataobject that contains the metadata to be imported.
If you use the
importXMPmethod, pass in the following values:- A
com.adobe.idp.Documentobject that represents the PDF file. - A
com.adobe.idp.Documentobject that represents an XML file that contains the metadata to be imported.
In either case, the returned value is a
com.adobe.idp.Documentobject 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
XMPUtilityServiceServiceobject by using your proxy class constructor. -
Invoke the XMP metadata import operation
To modify the XMP metadata, invoke either the
XMPUtilityServiceServiceobject’simportMetadatamethod or itsimportXMPmethod.If you use the
importMetadatamethod, pass in the following values:- A
BLOBobject that represents the PDF file. - An
XMPUtilityMetadataobject that contains the metadata to be imported.
If you use the
importXMPmethod, pass in the following values:- A
BLOBobject that represents the PDF file. - A
BLOBobject that represents an XML file that contains the metadata to be imported.
In either case, the returned value is a
BLOBobject 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
XMPUtilityServiceClientobject by using its constructor and passing aServiceClientFactoryobject that contains connection properties. -
Invoke the XMP metadata import operation
To inspect the XMP metadata, invoke the
XMPUtilityServiceClientobject’sexportMetadatamethod and pass in acom.adobe.idp.Documentobject that represents the PDF file. The method returns anXMPUtilityMetadataobject that contains the retrieved metadata.To retrieve and save the XMP metadata, invoke the
XMPUtilityServiceClientobject’sexportXMPmethod and pass in acom.adobe.idp.Documentobject that represents the PDF file. The method returns acom.adobe.idp.Documentobject that contains the retrieved metadata, which you can subsequently save to disk as an XML file.