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

Insert blank pages in PDF using JavaScript when requirements met.

New Here ,
Mar 31, 2019 Mar 31, 2019

Copy link to clipboard

Copied

Hi there,

I need to insert blank pages in a large PDF doc only once after it finds a specific word on that page and is odd.

For eg:  If the page has the word "Print this document" and the page number is 5, then insert a blank page only after it.

             If the page has the word "Print this document" and the page number is 6, then insert a blank page before and after it.

             If the page does not have the word "Print this document", do nothing.

The code sounds simple but I am just not sure.

Thanks if anyone could help would really appreciate it.

TOPICS
Acrobat SDK and JavaScript

Views

380

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
LEGEND ,
Apr 01, 2019 Apr 01, 2019

Copy link to clipboard

Copied

LATEST

To get text on a page use getPageNthWord. This only gets single Words so you must get successive words and check against the words you search for.

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