• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

Create a print button that will print a page range but only if data present?

New Here ,
Apr 20, 2020 Apr 20, 2020

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.

TOPICS
Acrobat SDK and JavaScript

Views

349

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Apr 20, 2020 Apr 20, 2020

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.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Apr 27, 2020 Apr 27, 2020

Copy link to clipboard

Copied

LATEST

Hello try67,

 

Thank you for the suggestion. My knowledge of arrays is limited. I'll research more and report back.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines