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

Interactive Button

Viv1969
Registered: May 28 2007
Posts: 4

How do I create a button that will print a certain range of pages within a document, say pages 3 to 5?
 
Thanks.

My Product Information:
Acrobat Pro 6.0.0, Windows
thomp
Expert
Registered: Feb 15 2006
Posts: 4411
1. Get the Acrobat JavaScript Reference
[url=http://www.adobe.com/devnet/acrobat/]http://www.adobe.com/devnet/acrobat/[/url]

2. Look up the "doc.print()" function and the "PrintParams" object.

At it's simplest, all you have to do is:

this.print({nStart:0, nEnd:1});

This will display the Print UI with pages 1-2 selected for printing. You cannot suppress the UI display from a document script.

Thom Parker
The source for PDF Scripting Info
www.pdfscripting.com
Very Important - How to Debug Your Script