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

Extract some pages and save that file

Explorer ,
Nov 01, 2016 Nov 01, 2016

I am writing a function that extracts some pages from a document so it can be used as proof. I have used a switch case that if it is true will output some pages. In the third case I want to extract the first two pages of the document, the 23rd and 24th and the two last pages. This is what I cant solve. Can I just use the this.extractPages method or do I have to use the insertPages method also. If I need the insertPages method how do I use it. The code is inside a trusted function.

  switch (true){

  

  case this.numPages == 1:

  this.extractPages(0,0, newPath);

  app.alert("A one paged proof has been created",3)

  break;

  case ( (this.numPages > 1) && (this.numPages < 9) 😞

  this.extractPages(0,1, newPath);

  app.alert("A two paged proof has been created",3)

  break;

(PROBLEM IS HERE) 

  case ( (this.numPages > 9) && (this.numPages < 49) 😞

  this.extractPages(0,1, newPath);

  app.alert("A proof has been created",3)

  break;

  default:

  app.alert("No proof has been created",3)

  break;

TOPICS
Acrobat SDK and JavaScript , Windows
815
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

correct answers 1 Correct answer

Community Expert , Nov 01, 2016 Nov 01, 2016

You can delete the unwanted pages and save the document.

Translate
Community Expert ,
Nov 01, 2016 Nov 01, 2016

You can delete the unwanted pages and save the document.

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
Explorer ,
Nov 01, 2016 Nov 01, 2016
LATEST

You are a great thinker Mr Bernd! Thank you!

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