Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
Bedrock Mission!

Learn more

View all

Sign in to view all badges

Adobe Summit 2023 [19th to 23rd March, Las Vegas and Virtual] | Complete AEM Session & Lab list

How to get XMP MetaData as an XML String in a process?


Level 2

Hi there,

I have a process where I would like to export a documents XMP MetaData, manipulate the XMP MetaData and then import the MetaData again to the document.

I thougt first I will use the service Name "XMPUtilityService" with the Service Operation "Export XMP" to export the XMP MetaData as a document.

Hoewer I am not sure how to manipulate the output document from the Export XMP service.

When I print out the document.toString() in a execute Script Service I get the following:

<document state="active" senderVersion="0" persistent="false" senderPersistent="false" passivated="false" senderPassivated="false" deserialized="false" senderHostId="null" callbackId="0" senderCallbackId="0" callbackRef="null" isLocalizable="true" isTransactionBound="false" defaultDisposalTimeout="600" disposalTimeout="600" maxInlineSize="65536" defaultMaxInlineSize="65536" inlineSize="3440" contentType="null" length="-1"><cacheId/><localBackendId/><globalBackendId/><senderLocalBackendId/><senderGlobalBackendId/><inline><?xpacket begin="" id="W5M0MpCehiHzreSzNTczkc9d"?>
<x:xmpmeta xmlns:x="adobe:ns:meta/" x:xmptk="A...</inline><senderPullServantJndiName/><attributes/></document>

Actually I expected something like this:

<?xpacket begin="" id="W5M0MpCehiHzreSzNTczkc9d"?>
<x:xmpmeta xmlns:x="adobe:ns:meta/" x:xmptk="Adobe XMP Core 5.0-jc006 DEBUG-1.0, 2009 Jun 23 11:07:21-PDT">
   <rdf:RDF xmlns:rdf="">
      <rdf:Description rdf:about=""
         <pdf:Producer>Adobe LiveCycle PDF Generator ES2</pdf:Producer>
      <rdf:Description rdf:about=""
      <rdf:Description rdf:about=""

<?xpacket end="w"?>

What do I need to do to get the XMPMeta data as an XML String from a document within a process?

Thanks in advance!


0 Replies


Level 10

The easiest thing is to change the output of the export metadata operation to "variable" and use the green + button to create a variable.

You'll see that it creates a variable of type XMPUtilityMetadata.

You can manipulate this variable in xPath and reuse it with the import metadata step.



Level 2


thanks for the answer.

I know that I can retrieve the XMPUtilityMetadata object, but this object provides only access to a few information suche as creator, subject, producer, etc.

However I would like to retrieve the whole XML String of the XMP Metadata.

How is this possible?




Level 10

You can also use Assembler to extract the metadata.

I tried with the following ddx and it gave me more information:

<Metadata result="doc1.xmp"
<PDF source="doc1.pdf"/>



Level 2

Yes, this is good. Sorry for the late response. I have read the answer earlier.

This helps.

Thanks, Jasmin.


The ultimate experience is back.

Join us in Vegas to build skills, learn from the world's top brands, and be inspired.

Register Now