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

JavaScript help extract, combine and print non sequential pages

New Here ,
Oct 31, 2018 Oct 31, 2018

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
444
Translate
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 ,
Oct 31, 2018 Oct 31, 2018

See newDoc and insertPages.

Translate
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 ,
Oct 31, 2018 Oct 31, 2018

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).

Translate
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 ,
Oct 31, 2018 Oct 31, 2018

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

Translate
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 ,
Oct 31, 2018 Oct 31, 2018
LATEST

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.

Translate
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