Copy link to clipboard
Copied
Hello,
Can anyone tell me how to create a print button that will print a page range, but only if data present on the page?
Example:
I have a ten-page pdf. Page one is the data entry page with five data fields (A, B, C, D, E). Pages 2 through 10 are template forms.
Data entered into one or all of the data fields on page one populates pages 2 through 10. If I enter information into data fields A, B, and C, but leave D and E blank, there's no need to print all 9 pages, I only need to print pages 5, 6, and 9.
Copy link to clipboard
Copied
This can be done using a script. You can compose an array of page numbers to print based on the values of the fields and then use that array as the printRange parameter of the PrintParams object when calling the print method of the document, if the array is not empty, of course.
Copy link to clipboard
Copied
Hello try67,
Thank you for the suggestion. My knowledge of arrays is limited. I'll research more and report back.