cancel
Showing results for 
Search instead for 
Did you mean: 

Current page printing problem - while repeating pages : Adobe forms

Former Member
0 Kudos

Hi Experts,

I have a problem in printing current page number of an adobe form.

My requirement is that , my form got 2 pages. On first page i am not printing page numbers and excluded from numbering.

Numbering starts from second page. The second page needs to be repeated twice.

In this case my page printing should look like :

First page - no page number

second page - 1 of 1

Third page - 1of 1 (as it is a copy)

IF second page extends to multiple pages (eg.. 2)

First page - No Page no

First instance of second page - 1of 2 , 2 of 2

Second instance of second page - 1 of 2 , 2 of 2 . Presently it is printing like : 3 of 2 , 4 of 2. I need to initialize current page count. I could able to set the total page count 2 via variable from print program. But while printing the second instance, I am not able to initialize the current page count.

I have seen the following thread which exactly talks about my problem but with out any solution.

Can any one help me in this regard.

Thank You,

Regards,

Naresh.

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi,

I am not sure how your page design looks like.

Assumption:

During runtime, ONLY 1 page for Page1, multiple pages for Page2 and Page3, same number of pages for Page2 and Page3.

This is what i did:-

I have 3 pages:

Page1: With NO page number: ONLY 1 page

Page2: With page number: Multiple page

Drag the "Insert -> Custom -> Page n of m"

- TextField: "CurrentPage",

-- replace the original script: "this.rawValue = xfa.layout.page(this)" with "this.rawValue = xfa.layout.page(this) - 1"

- TextField: "PageCount",

-- replace the original script: "this.rawValue = xfa.layout.pageCount()" with "this.rawValue = ( xfa.layout.pageCount() - 1 ) / 2"

Page3: With page number: Multiple page

Drag the "Insert -> Custom -> Page n of m"

- TextField: "CurrentPage",

-- replace the original script: "this.rawValue = xfa.layout.page(this)" with "this.rawValue = xfa.layout.page(this) - 1 - ( xfa.layout.pageCount() - 1 ) / 2"

- TextField: "PageCount",

-- replace the original script: "this.rawValue = xfa.layout.pageCount()" with "this.rawValue = ( xfa.layout.pageCount() - 1 ) / 2"

Good luck.