Expand my Community achievements bar.

July 31st AEM Gems Webinar: Elevate your AEM development to master the integration of private GitHub repositories within AEM Cloud Manager.

Adding text to source document in DDX xml.


Level 2


     I want to add some extra thing in my application..my problem scenario is:

     I am using invokeDDX() to convert and merge 2 file say 1 doc and 1 jpg,now the thing is I want add some text in those document,I am able to add text using


<PageContent  appears="OnTop" verticalAnchor="Top" verticalOffset="-7pt" horizontalAnchor="Left" horizontalOffset="15pt">

               <p><b>This is text</b></p>



It is adding  text in each page ,but I want to add text only in starting page of each document (suppose 1st source document(.doc) has 10 pages and 2nd source doc(.doc) has 10 pages ,the expected result should be -->in result pdf no 1 page will have some text(added by mtyself) and in 11th page there will be some text added by me) .

Is it possible using DDX language?

if possible how can we do that?

If not possible then any idea how can I do that?

Thanking you.

Barun Barik.

5 Replies


Level 10

It should be possible with the DDX language.

The way I would approach it is the following:

- extract the first page of the document

- add the text to the single page

- add the page back

- repeat the same for each document

- add the updated documents together



Level 2


     Thanks for answering Jasmin.I have come counter question ....

      1.After extracting the page content ,when we add the text content to a blank page ,will it retain old text format or paragraph (i.e bold,italics or different text font)?

2. When we add back to the original document we have to leave the old first page...how we will do that?

3.where can I get an example of extracting content from a document using DDX?

Thanking You.

Barun Barik


Level 8

I think sunithaedfs set her out of office to respond to forum posts.  I have notified the administrator.  Please ignore the messages.

I pulled this from the Assembler test app that comes with LiveCycle  (http://servername:8080/Assembler/).  It shows how to extract specific pages from a PDF using a DDX:

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

    <PDF result="Cover">
        <PDF source="doc1" pages="1"/>

    <PDF result="Dogs">
        <PDF source="doc1" pages="2-3"/>

    <PDF result="Cats">
        <PDF source="doc1" pages="4-5"/>

    <PDF result="Kittens">
        <PDF source="doc1" pages="6-penultimate"/>

    <PDF result="Summary">
        <PDF source="doc1" pages="last"/>