This content has been marked as final. Show 4 replies
The server is only going to be able to print to printers of which the
server is aware. You can not automatically print to a client's printer,
that would be a really horrible thing if HTTP allowed this.
There are some activeX controls that may do this for Windows OS systems,
but the users will have to agree to install them.
But generally this is not a good idea for a server client system.
Note to Ian, in an intranet environment it's a conceivable job. In fact one of my current projects involves "no prompt printing". Unfortunately for Shikha, I'm not printing pdfs so what I did might not work for you.
But it might give you some ideas. My approach was to write a batch file that launched notepad in minimized state on the server. Notepad would then print the text file I had created to the server's default printer.
Maybe Ian will be nice and give you a hint on how to find those active x controls.
I know Acrobat does have some scripting interfaces, but unfortunately I'm not that familiar with them. You could try doing a serach for instantiating the Acrobat software as a COM object.
You might want to check out iText. A version of iText is already installed with Coldfusion MX 7, so installing the latest version on the server may not be necessary. The link is located below. Review the section entitled, 'Silent printing'. Again, a version of iText.jar is already on the server, so try the code first, and if it doesn't necessarily work, then you'll have to install the latest version for best results.