Inserting a blank page before a bookmark if the previous section has an odd number of pages

New Here ,
Oct 15, 2020

Copy link to clipboard

Copied

Hi,

 

I have a PDF containing multiple report cards, and each student's report card is bookmarked. Some report cards have an even number of pages, and some are odd. That and the number of pages vary depending on how much was written on the report card and the student's grade level, therefore it is not a set number of pages.

 

I would like to insert a blank page after each report card that ends on an odd number of pages, so that the entire PDF can be printed double-sided.

 

These PDFs are generated from our Student Information System. The SIS Tech Support is not giving me a solution to do this directly from the system, therefore I am trying with Adobe Acrobat Pro DC.

 

I am not familiar with Javascript. I have found how to add an action to "Execute Javascript", but I do not know how to write the proper code to do this, if it's possible. I have found codes to add pages at the end of odd docs, but not the end of bookmarked sections.

 

Does anyone have any suggestions? Please let me know if I can provide any other info.

 

Thank you,

TOPICS
Acrobat SDK and JavaScript, Edit and convert PDFs, How to

Views

33

Likes

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

Inserting a blank page before a bookmark if the previous section has an odd number of pages

New Here ,
Oct 15, 2020

Copy link to clipboard

Copied

Hi,

 

I have a PDF containing multiple report cards, and each student's report card is bookmarked. Some report cards have an even number of pages, and some are odd. That and the number of pages vary depending on how much was written on the report card and the student's grade level, therefore it is not a set number of pages.

 

I would like to insert a blank page after each report card that ends on an odd number of pages, so that the entire PDF can be printed double-sided.

 

These PDFs are generated from our Student Information System. The SIS Tech Support is not giving me a solution to do this directly from the system, therefore I am trying with Adobe Acrobat Pro DC.

 

I am not familiar with Javascript. I have found how to add an action to "Execute Javascript", but I do not know how to write the proper code to do this, if it's possible. I have found codes to add pages at the end of odd docs, but not the end of bookmarked sections.

 

Does anyone have any suggestions? Please let me know if I can provide any other info.

 

Thank you,

TOPICS
Acrobat SDK and JavaScript, Edit and convert PDFs, How to

Views

34

Likes

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
Oct 15, 2020 0
Most Valuable Participant ,
Oct 15, 2020

Copy link to clipboard

Copied

This is possible with a script, but not that simple, since you don't have direct access to the properties of the bookmarks in such a way. What can be done, though, is to execute the bookmarks and then check the current page number. Based on that you can calculate the length of each section and decide whether a blank page should be added to it. However, that is also tricky because when you add pages to the file you're changing the pages number of all of those that follow them...

Likes

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
Reply
Loading...
Oct 15, 2020 1
Muy5FC5 LATEST
New Here ,
Oct 23, 2020

Copy link to clipboard

Copied

Thanks for the suggestion!

Likes

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
Reply
Loading...
Oct 23, 2020 0