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

Print JS code doesn't work

FayeC
Registered: Jan 9 2008
Posts: 15

I created a form with a button that runs a javascript to print the document (is there an easier way to do this in Acrobat (not LiveCycle)??).
I read the scripting guide and added the following code to the button's Javascript:
// get the printParams object of the default printer
var pp = this.getPrintParams();
// set some properties
pp.interactive = pp.constants.interactionLevel.full;
pp.colorOverride = pp.colorOverrides.auto;
// print
this.print(pp);

But the button doesn't work.
What am I missing?

Thanks,

FayeC

My Product Information:
Acrobat Pro 8.1.1, Windows
tedpadova
ExpertTeam
Registered: Dec 31 2005
Posts: 848
Download my eBook 101FormseTips.pdf from Acrobat Users (look at the home page for the link). You'll find the proper coding for a JavaScript to print a document.

ted

The author of numerous books on Acrobat, Photoshop, Illustrator and the Adobe Creative Suite, and an international speaker on Adobe Acrobat, Ted Padova is a well-known PDF guru.