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

Printing portions of a document using Destination marks?

mferrell
Registered: Feb 12 2008
Posts: 2

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

My Product Information:
Acrobat Pro 7.0.9, Windows
thomp
Expert
Registered: Feb 15 2006
Posts: 4411
Why yes, there are two ways to approach this problem with destinations.

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