cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Incorrect Stitching

Veera111
Explorer
0 Likes
567

Hello All,

I'm currently working on printing very large PDF documents via the ADS stitching technology. It's all working fine, however, I'm having some problems with the page numbering.

I start the print job with FP_JOB_OPEN and run the generated Adobe Form several times in LOOP ENDLOOP. After calling FP_JOB_CLOSE I can retrieve the final PDF document via FP_GET_PDF_TABLE.

The annoying thing is, that each call of the form starts the page numbering from 1 again. So, in my final document I have several pages 1 - that's not really what I wanted.

Examples: If I want to generate large data of PDF 'P' then I splitting it to A, B, C with stitching
A is having 60 pages, B is having 70 pages, C is having 40 Pages. Finally generated document 'P', should contain paging 1-170,instead  it is generating 1-60 1-70 1-40 for each stitching.

My idea was to give each print the page number to start counting from. Is there any way to get the page numbers when using stitching properly.

Many thanks,
Vysakh

Accepted Solutions (0)

Answers (1)

Answers (1)

PascalBremer
Product and Topic Expert
Product and Topic Expert
0 Likes

Hi Vysak,
when using batching / stitching, there are special JS commands offered to enable page numbering across the different chunks. Or to cite the documentation:

"""
For all batch output, pages will be numbered consecutively across individual documents, but only when those
documents are rendered using the same template. That is, the first document will start at page one and the second document will continue where the first left off. To enable this, some settings in Designer must be set, as follows.
When designing the template, modify the default scripts for CurrentPage and PageCount as follows:
For CurrentPage, replace
xfa.layout.page(this) with xfa.layout.absPageInBatch(this),

which starts with 0; so if you want to use 1 as the first page, use:
xfa.layout.absPageInBatch(this)+ 1.

For PageCount (total page number), replace:
xfa.layout.pageCount() with xfa.layout.absPageCountInBatch()
"""

Best regards
Pascal

Veera111
Explorer
0 Likes
Thanks.It worked and Page number is showing continuous numbering.
Veera111
Explorer
0 Likes
However we are facing one more issue.We are trying to hide the subform based on condition we used for stitching. Written this code at JS Initialize event and it's now working. if (xfa.resolveNode("data.BODY.summary_data.TextField3").rawValue == 'X') { data.BODY.summary_data.presence = "visible"; this.presence = "visible"; } else { data.BODY.summary_data.presence = "hidden"; this.presence = "hidden"; }.