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

Changing printer properties through Javascript

sneyash59
Registered: Dec 12 2007
Posts: 9

Q: 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?
 
A: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.
 
— Answered by Thom Parker on Thu, Dec 13, 2007
  
Re to your Answer:
Can you please tell me how can I "fake out the print function by specifying booklet properties that amount to 1 page per side"
and about the second point, are you telling about setting the document options while printing it or to set some document properties of the pdf file present with me?
Regards,
Snehal

My Product Information:
Acrobat Pro 8, Windows
sneyash59
Registered: Dec 12 2007
Posts: 9
Hi Thom, Can you please reply this query which is:-
Can you please tell me how can I "fake out the print function by specifying booklet properties that amount to 1 page per side"