JavaScript help extract, combine and print non sequential pages

New Here ,
Oct 31, 2018

Copy link to clipboard

Copied

I am looking to extract pages 7, 16, 17 of an 18 page document...and then combine them into one separate document.

At the moment I am using:

this.print({ nStart: [7 - 1], nEnd: [ 7 -1] });
this.print({ nStart: [ 16 - 1], nEnd: [ 17 - 1] });

Printing the pages and then combining them manually which is not great...

Any help would be greatly appreciated.

TOPICS
Acrobat SDK and JavaScript, Windows

Views

128

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

JavaScript help extract, combine and print non sequential pages

New Here ,
Oct 31, 2018

Copy link to clipboard

Copied

I am looking to extract pages 7, 16, 17 of an 18 page document...and then combine them into one separate document.

At the moment I am using:

this.print({ nStart: [7 - 1], nEnd: [ 7 -1] });
this.print({ nStart: [ 16 - 1], nEnd: [ 17 - 1] });

Printing the pages and then combining them manually which is not great...

Any help would be greatly appreciated.

TOPICS
Acrobat SDK and JavaScript, Windows

Views

129

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 31, 2018 0
Most Valuable Participant ,
Oct 31, 2018

Copy link to clipboard

Copied

See newDoc and insertPages.

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 31, 2018 0
Most Valuable Participant ,
Oct 31, 2018

Copy link to clipboard

Copied

There's no need to print them at all. Actually, it won't work if you do it.

The way to do it is to create a new document (using the newDoc method) and then insert pages from the old file into it (using the insertPages method). At the end of the process you delete the first page of the new file since it's a blank page added by default (using the deletePages method).

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 31, 2018 0
New Here ,
Oct 31, 2018

Copy link to clipboard

Copied

Thanks for your assistance. Very new to all this...are you able to assist with a code?

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 31, 2018 0
try67 LATEST
Most Valuable Participant ,
Oct 31, 2018

Copy link to clipboard

Copied

Well, I've provided the basic structure of the code to do it. Do you have specific questions, or do you want me to write the whole thing for you? If the latter please contact me privately (try6767 at gmail.com) and we could discuss it in more detail, including the price.

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 31, 2018 1