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

Printing specific page from a Pdf with Javascript

patra
Registered: Oct 19 2006
Posts: 270

Hi everyone,
there is any way applling a script into a button named "print" so when
a user clik to print only page 5 for example from the pdf file.

Thanks for all your help

My Product Information:
Acrobat Pro 8.1.2, Windows
gkaiseril
Expert
Registered: Feb 23 2006
Posts: 4308
In Acro Forms you can use the "print()" method (all versions) or the "PrintParam" object (Acrobat/Reader version 6 or above). Both support a start and end page parameter.

this.print({bUI: false, nStart: 4, nEnd: 4, bSilent: true, bShrinkToFit: true});

More information is contained in the
[url=http://www.adobe.com/devnet/acrobat/javascript.php|JavaScript for Acrobat]documentation.

For LiveCycle Designer you use the page numbers converted to strings. More information is contained in the scripting references available under LiveCycle Designer's "Help" menu option.

George Kaiser