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

How to assemble a list of PDFs in the right order?

Avatar

Level 1

Hi forum,

I've got a LC process where I want to assemble a dynamic number of PDFs into one single PDF. I'm using the following DDX to do this:

<DDX xmlns="http://ns.adobe.com/DDX/1.0/">

  <PDF result="process:///process_data/@pdfOut">

    <PDF source="process:///process_data/docList" bookmarkTitle="_SourceTitle" />

  </PDF>

</DDX>

pdfOut -> document

docList -> list<document>

As I insert a list I would assume that the order of the subdocuments in the result is determined by the order of the source list. Unfortunately that's not the case, the assembly has a random order. When I inspect the list right before the invokation of the DDX, the order is just fine.

Any ideas why the order is gone?

Thanks in advance,

Sebastian

1 Accepted Solution

Avatar

Correct answer by
Level 1

OK, i've got it working:

The order is correct, if the list is delivered via the Input Document Map:

<DDX xmlns="http://ns.adobe.com/DDX/1.0/">
  <PDF result="process:///process_data/@pdfOut">
    <PDF source="docList" bookmarkTitle="_SourceTitle" />
  </PDF>

  <?ddx-source-hint name="docList"?>
</DDX>

I still don't know why the order gets lost if I deliver a process variable, so it should be treated as a bug.

Sebastian

View solution in original post

1 Reply

Avatar

Correct answer by
Level 1

OK, i've got it working:

The order is correct, if the list is delivered via the Input Document Map:

<DDX xmlns="http://ns.adobe.com/DDX/1.0/">
  <PDF result="process:///process_data/@pdfOut">
    <PDF source="docList" bookmarkTitle="_SourceTitle" />
  </PDF>

  <?ddx-source-hint name="docList"?>
</DDX>

I still don't know why the order gets lost if I deliver a process variable, so it should be treated as a bug.

Sebastian