Skip to main content
Inspiring
June 10, 2017
Question

flatten page range seems to not work

  • June 10, 2017
  • 1 reply
  • 388 views

I am using the script below in a button on the first page of an 8 page document. Its purpose is to flatten the first six pages of the form and leave pages 7 and 8 unaffected by the script. However, all 8 pages are flattened by this script. I am not using and do not need the optional nNonPrint parameter.

this.flattenPages({

    nStart: 0,

    nEnd: this.numPages - 2,

    });

Am I doing something incorrectly? How can I accomplish my objective of leaving the last 2 pages undisturbed by this script?

Also, since the AcrobatUsers.com forum was replaced, I don't believe I have ever received a response to a question I have posted here, whereas before I nearly always received a response. I don't know why I am not receiving response, but if someone responds to this, please send me an email to tell me that you have responded and how I can find your response.

Thank you.

David Dunn

DDunn@DavidSDunn.com

This topic has been closed for replies.

1 reply

Inspiring
June 10, 2017

You have an error in your syntax. There should be no coma after the last parameter.

If you want to delete pages 1 - 6 then the start page for JavaScript is 0 and the last page is 5 (physical page number less 1).

Adjusting for all of that it does appear you have found a but in the JavaScript. Without the named parameters the code works. with the named parameters the code fails. You should report this to Adobe through the Feature/Bug Report page.

This is a User 2 User forum and most responders are volunteers, so you may need to wait some time for an answer. All staff responders are identified as Staff.

ODuinnAuthor
Inspiring
June 10, 2017

Thank you. I added a vote to your report of this bug.

David