These forums are now Read Only. If you have an Acrobat question, ask questions and get help from one of our experts.

Print Specific Range using JS

BillA
Registered: Feb 11 2008
Posts: 18

Working with 150+ page, multi-chapter document with 4 levels of bookmarks. I've created a button for the first page of each chapter. Each button has JS set to print just that chapter. Although this works, each button/script must be written to reflect the specific page numbers to be printed. Here is an example of the script I'm using:
this.print({
bUI: true,
bSilent: true,
bShrinkToFit: true,
nStart:5,
nEnd:10
})
My question is this: The entire document is fluid and will change. I was hoping that I could create buttons that could be reused for each chapter with code that prints the present chapter only. Is it possible to pick up a top-level bookmarks, or 'name' first and last page of a chapter?

Thank you for any advice,
Bill

My Product Information:
Acrobat Pro 7.0.5, Windows
gkaiseril
Expert
Registered: Feb 23 2006
Posts: 4307
If you are sure the bookmarks goto the appropriate page and the bookmarks names will not change, one could use the bookmark object's "execute" method to go to the associated page and then get the page number in the document.

George Kaiser