I have a simple javascript:
this.print ({
nStart: 10,
nEnd: 100
})
That I use to give the user a way to click a link and have a section of the document setup for printing. My problem is that whenever I change the amount of pages within the document I have to re-enter the nStart and nEnd for every section within the document.
Is there a way to use the Destination marks within a document instead of using a static number?
Or perhaps there is another way to mark the document.
Thanks for your assistance,
Matt
1. Create named destinations for key pages. Then in the print script navigate to the end points to collect the page numbers before printing. Before doing this, save the "doc.viewState" and restore it after printing.
2. Use bookmarks to exactly the same thing. Assign bookmarks to the key pages. In the print script search the bookmarks for the titles of the pages you want to print, execute the bookmarks to collect the page numbers, and print.
Thom Parker
The source for PDF Scripting Info
www.pdfscripting.com
Very Important - How to Debug Your Script