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

Exclude some pages from numbering in DDX

kkaarrtthhiicc
Level 1
Level 1

Hi,

I have a need to exclude certain pages/documents from displaying the page number in an assembled document.

For example, if there are 10 documents that i'm assembling together, a few documents in between should not have the Page numbers in the Footer.

i.e. if these 10 documents contribute to a total of 20 pages, currently it displays as Page 1 of 20, Page 2 of 20 etc.

If i do not want say about 5 pages to display the number, it should display as Page 1 of 15, Page 2 of 15, followed by the 5 pages that do not have the page numbers, and then remaining pages like Page 3 of 15 etc.

Currently we use DDX Footer tags like "<_PageNumber/> of <_LastPageNumber/>".

Below is a sample DDX that we use.

Please assist me on this.

Sample DDX:

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

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

     <PDF result='out.pdf'>

         <Footer replaceExisting='true'>

             <Right>

                 <StyledText font-size='8pt' font-family='Helvetica'>

                     <p>Page <_PageNumber/> of <_LastPageNumber/>

                     </p>

                 </StyledText>

             </Right>

         </Footer>

         <Watermark rotation='45' scale='100%' opacity='10%' fitToPage='true'>

             <StyledText font-size='56pt' font-family='Helvetica'>

                 <p>

                     <b>DRAFT</b>

                 </p>

             </StyledText>

         </Watermark>

         <PageMargins left='0.5in' top='0.5in' right='0.5in' bottom='0.2in' alternation='None' />

         <PDF source='source0' bookmarkTitle='chap0'/>

         <PDF source='source1' bookmarkTitle='chap1'/>

         <PDF source='source2' bookmarkTitle='chap2'/>

         <PDF source='source3' bookmarkTitle='chap3'/>

         <NoXFA/>

     </PDF>

</DDX>

Thanks,

Karthic

2 Replies
sharoon23
Employee
Employee

Hi Karthik,

Yes, you can achieve it by using page labels. Below is ddx you can use for it.

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

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

          <PDF result='out.pdf'>

                    <Footer replaceExisting='true'>

                              <Right>

                                        <StyledText font-size='8pt' font-family='Helvetica'>

                                                  <p>Page <_PageLabel/> of <_LastPageLabel/>

                                                  </p>

                                        </StyledText>

                              </Right>

                    </Footer>

                    <Watermark rotation='45' scale='100%' opacity='10%' fitToPage='true'>

                              <StyledText font-size='56pt' font-family='Helvetica'>

                                        <p>

                                                  <b>DRAFT</b>

                                        </p>

                              </StyledText>

                    </Watermark>

                    <PageMargins left='0.5in' top='0.5in' right='0.5in' bottom='0.2in' alternation='None' />

                    <PDF source='doc1' bookmarkTitle='chap0'>

                              <PageLabel mode="Define" start="1" format="Decimal" />

                    </PDF>

                    <PDF source='doc2' bookmarkTitle='chap1' >

                              <NoFooters />

                    </PDF>

                    <PDF source='doc3' >

                              <PageLabel mode="Define" start="9" format="Decimal" />

                    </PDF>

                    <NoXFA/>

          </PDF>

 

</DDX>

This DDX takes three source doc1, doc2, doc3. doc1 refers to pages in the begining of the document. doc2 refers to those pages on which you dont want to display footer. doc3 refers to remaining pages. You should assemble these 3 document separately using simple assemnbly ddx and then use the resultant files as sources to this DDX.

Also, you must set the start value of the PageLabel tag for doc3 to be 1 greater than the number of pages in doc1. This you easily do querying the properties of doc1 in a separate process and then using the number of pages from that.

Let me know if you need any help in doing this.

Regards,

Sufyan


kkaarrtthhiicc
Level 1
Level 1

Thanks a lot Sharoon. i'm now able to achieve this.

Can you please let me know how I can query to get the number of pages in each doc?