Expand my Community achievements bar.

Radically easy to access on brand approved content for distribution and omnichannel performant delivery. AEM Assets Content Hub and Dynamic Media with OpenAPI capabilities is now GA.

Printing question: Is this possible

Avatar

Former Community Member
Is there a way that the document can be set to print duplex via code

I have a doc that prints duplex but only if you tell the printer to do duplex. Most of the users just hit the print button and it comes out on 2 pages. What i would like to do is embed some code or some sort of instruction set in the document.

Thanks for any comments

Wayne
2 Replies

Avatar

Level 5
See the PrintParams property in the Acrobat JavaScript Scripting Reference.

pageHandling allows you to specify the number of pages per printer page. Other associated properties handle vert/horiz/etc.



Good Luck

Avatar

Level 1
Several ways to do this -



(Option available only in LiveCycle Desginer ES)

From the toolbar menu choose "File > Form Properties ..." then choose the "PDF Print Options" tab. You can set the form to duplex in there (it adds an XML tag setting duplexMode to an integer value).



(Option available via script)

var myDoc = event.target;

var pp = myDoc.getPrintParams();



pp.DuplexType = <constant>;

myDoc.print(pp);



Where <constant> is one of:

pp.constants.duplexTypes.DontCare

pp.constants.duplexTypes.Simplex

pp.constants.duplexTypes.DuplexFlipLongEdge

pp.constants.duplexTypes.DuplexFlipShortEdge