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

Changing properties of a printer through javascript

sneyash59
Registered: Dec 12 2007
Posts: 9

Q: Hi..I need to change the properties of my printer through javascript. I am using Adobe Acrobat 8.0 proffesional. I need to find out that is there any way that i can set my simplex configured printer on a network to print duplex form. Please help
 
A:This JavaScript is for printing booklets in duplex mode - printing only the front pages. You can adjust the code for your situation.
 
pp.pageHandling = pp.constants.handling.booklet;
pp.booklet.duplexMode = pp.constants.bookletDuplexModes.FrontSideOnly;
this.print(pp);
 
constants.bookletDuplexModes has three properties: BothSides, FrontSideOnly and BackSideOnly.
 
For printers that print only on one side, use FrontSideOnly first then reinsert the printed pages and print again with BacksideOnly to complete a manual duplex printing.
 
Re to your answer: Thanks for the reply but Actually I dont want it to print it as a booklet i.e 2 pages on one side. Instead I need one page on one side. We have a simplex configured printer. We want to change the properties of the printer so that it will print duplex (one page on front and second on backside). Can you please help me regarding this issue?

My Product Information:
Acrobat Pro 8, Windows
thomp
Expert
Registered: Feb 15 2006
Posts: 4411
If your printer has the ability to print duplex then the "Booklet" properties are currently the only way this can be done with Acrobat JavaScript, there are no other JavaScript options. You might be able to fake out the print function by specifying booklet properties that amount to 1 page per side.

Alternatively you can manually set the PDF document properties to force Duplex or Simplex printing. But there is currently no way to do this in JavaScript.

Thom Parker
The source for PDF Scripting Info
www.pdfscripting.com
Very Important - How to Debug Your Script