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

silent print in Duplex mode using java script

mendu
Registered: Jun 15 2008
Posts: 4

Hi,

I am trying to invoke silent print in Duplex mode. I am using the below code in the java script file, but still it prints in Simplex mode. Is there any other way of coding it in java script?

function JSSilentPrintDuplex(theDoc)
{
var pp = theDoc.getPrintParams();
pp.interactive = pp.constants.interactionLevel.automatic;

pp.DuplexType = pp.constants.duplexTypes.DuplexFlipLongEdge;

var fv = pp.constants.flagValues;
pp.flags |= fv.setPageSize;
theDoc.print(pp);
}
I even tried with the below options also:

pp.DuplexType = pp.constants.duplexTypes.Duplex;
pp.DuplexType = pp.constants.duplexTypes.DuplexFlipShortEdge;

Solution for this is appreciated, Thank You.

My Product Information:
Reader 8.0, Windows
gkaiseril
Expert
Registered: Feb 23 2006
Posts: 4308
Have you looked at the "PrintParms" "constants" "bookletDuplexMode"?

It is the only refernece to "duplex" in the JS Api and the example:

Example 2 (duplexMode)

Print booklet in duplex mode, printing only the front pages.
pp.pageHandling = pp.constants.handling.booklet;
pp.booklet.duplexMode = pp.constants.bookletDuplexMode.FrontSideOnly;
this.print(pp);

George Kaiser

mendu
Registered: Jun 15 2008
Posts: 4
Thank you for the reply. Yeah i had tried the booklet option. But my requirement is not to print it as a booklet. I want the document to be printed not as a booklet, instead two pages on two sides of the paper.