Expand my Community achievements bar.

Don’t miss the AEM Skill Exchange in SF on Nov 14—hear from industry leaders, learn best practices, and enhance your AEM strategy with practical tips.
SOLVED

Creating PDF Portfolio in ES2.

Avatar

Former Community Member

Hi  ,

I have created DDX  file and  previewed the same in Assembler Descripter   editor , am  able to create PDF portfolio  and save it  into local system.

The DDX  :

<DDX xmlns="http://ns.adobe.com/DDX/1.0/">
  <PDF result="Untitled 1">
    <Portfolio>
      <Navigator source="mysrc"/>
      <ColorScheme scheme="pinkScheme"/>
    </Portfolio>
    <PackageFiles>
      <PDF source="sourcePDF1"/>
      <PDF source="sourcePDF2"/>
    </PackageFiles>
  </PDF>
  <?ddx-source-hint name="mysrc"?>
  <?ddx-source-hint name="sourcePDF1"?>
  <?ddx-source-hint name="sourcePDF2"?>
</DDX>

Used above DDX  file to genarate  the PDF Portfolio thru Activity  "AssemblerService -  Invoke DDX ", I  hope I genarated the PDF Portfolio, but i  don't know how to   retrive  the  PDF portfolio from AssemblerResult output Variable.

I  got same log files in both  cases ....So  assuming  that Process created PDF Portfolio.

But I dont know how to  get the PDF portfolio from AssemblerResult and store into local system.

Please help  me to get PDF Portfolio from AssemblerRequest  output variable.

Attached AssemblerResult as attachment.

Thanks

Praveen

1 Accepted Solution

Avatar

Correct answer by
Level 3

Hi,

Please try this xpath "/process_data/assemblerResult/object/documents[1]". Assign this to a local document variable.

Since AssemblerResult/object/documents is a map of successful documents from the DDX job. Another approach could be to use get-map-values-for-keys function.

Thanks

Ankit

View solution in original post

2 Replies

Avatar

Correct answer by
Level 3

Hi,

Please try this xpath "/process_data/assemblerResult/object/documents[1]". Assign this to a local document variable.

Since AssemblerResult/object/documents is a map of successful documents from the DDX job. Another approach could be to use get-map-values-for-keys function.

Thanks

Ankit

Avatar

Level 8

I've always done it in a two step process (done all in one setValue operation):

1 - assign the resulting documents to a Map[document] object using the xpath:

/process_data/myMap =   /process_data/assemblerResult/object/documents

2 - get the correct response from the map.  The map's key name will be the same as is in your DDX's result tag.  In your case "Untitled 1"

/process_data/@myDoc = /process_data/myMap[@id="Untitled 1"]

With ES2 you can include the /process_data/@myDoc right in the DDX

<DDX xmlns="http://ns.adobe.com/DDX/1.0/">
  <PDF result="process:///process_data/@myDoc">
    <Portfolio>

...