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

PDF Print

arghya.mp
Registered: Jul 18 2007
Posts: 8

How can I change the Printer Settings like Printer name and print a PDF document from a web page? I have written code in javascript but it is opening the PDF Print dialog. I want to bypass that. See my code :
   
function doit() {
var x = document.getElementById("doodad");
x.click();
x.setActive();
x.focus();
x.print();
}
     
howdy
   
If i write Print(False) It wont open dialog but printing not done. What should I do?

My Product Information:
Reader 8, Windows
thomp
Expert
Registered: Feb 15 2006
Posts: 4411
Communication between Acrobat and HTML is dubious at best. You can do this but from JavaScript but it's not reliable. There may be other methods using the Acrobat OCX from the browser.

But for JavaScript you will need to use the "HostContainer" object. Take a look at this and related objects in the Acrobat JavaScript Reference and the Guide. Then look at this example.

[url=http://www.windjack.com/WindJack/Browser2PDF/brwsr2acroJS.htm]http://www.windjack.com/WindJack/Browser2PDF/brwsr2acroJS.htm[/url]

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