Expand my Community achievements bar.

Learn about Edge Delivery Services in upcoming GEM session

Order of pages in a PDF

Avatar

Level 2

Hello everyone,

I'd like to change the order of pages in a pdf. I have tried to create a DDX like this:

<?xml version='1.0' encoding='UTF-8' ?>

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

    <PDF result='out.pdf'>

      <PDF source='AssemblerResultPDF.pdf' pages='2,1,10,4,9,5,3,11,12,13,14' />

    </PDF>

  </DDX>

it does suppress the pages that are not present in the range (here pages 6,7 and 8) but the result stays in the ascending order (here 1,2,3,4,5,9,10,11,12,13,14).

in the ddx docu there is this exampe: penultimate,4,5,1-3 but still, my result is page 1 to 5 and then (with the above pdf) page 13.

This behaviour seems strange to me. Is it normal? Is there a way to change the order of pages in a pdf.

Regards

Antoine

1 Reply

Avatar

Level 2

I have come to find a tricky thing that makes what I want. If I change my xml to the following, it works:

<?xml version='1.0' encoding='UTF-8' ?>

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

    <PDF result='out.pdf'>

      <PDF source='AssemblerResultPDF.pdf' pages='2' />

      <PDF source='AssemblerResultPDF.pdf' pages='1' />

      <PDF source='AssemblerResultPDF.pdf' pages='10' />

      <PDF source='AssemblerResultPDF.pdf' pages='4' />

      <PDF source='AssemblerResultPDF.pdf' pages='9' />

      <PDF source='AssemblerResultPDF.pdf' pages='5' />

      <PDF source='AssemblerResultPDF.pdf' pages='3' />

      <PDF source='AssemblerResultPDF.pdf' pages='11' />

      <PDF source='AssemblerResultPDF.pdf' pages='12' />

      <PDF source='AssemblerResultPDF.pdf' pages='13' />

      <PDF source='AssemblerResultPDF.pdf' pages='14' />

    </PDF>

  </DDX>

It s easy to automate the creation of this list but is there a better way than that?? Because that s not that beautiful in my code I think.