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

Javascripting printing

Damian
Registered: Dec 14 2007
Posts: 13
Answered

Hi all

I've written a quick script (see below) to automate printing a specific page from one of our forms, however i now need to enable the printing of stamps, but am unsure as to go about it. Currently any stamps applied to this page do not print with the rest of it.

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

this.pageNum = variable

Thanks for any help you can give me

Damian

My Product Information:
Acrobat Pro 8.0, Macintosh
gkaiseril
Expert
Registered: Feb 23 2006
Posts: 4308
You will need to use the "PrintParms" object introduced in with verison 6, so all users will need version 6 or above, since this object can set the print contents parameter.

var pp = this.getPrintParams();
pp.interactive = pp.constants.interactionLevel.silent;
pp.printContent = pp.constants.printContents.docAndComments;
pp.firstPage = 7;
pp.lastPage =7;
pp.pageHandling = pp.constants.handling.none;
this.print(pp);

If any users have version 7 or above there is a security restriction on use the bSilent true or the interaction silent parameter. More information is included in the JavaScript API Reference.

George Kaiser