Jonas asks: > sure, but i dont wont to transfer any pdf directly to the user. > i want to print the pdf (stored on the server) over the browser > (javaservlet) directly to the users printer, if he push a print button at the > servlet... :)
I'm using Cocoon rather than raw servlets, but did manage to resolve this problem in my application, where I can fire of the printing of a dynamically generated PDF under program control. The final solution used two parts: 1) A Cocoon flowscript piece of code that generates the PDF and saves it in a temp dir for printing, then calls part 2. Flowscript is just a custom version of Javascript, so this would translate pretty easily into Java servlet code. 2) A VBS (ugh!) script that uses acrord32.exe (the Acrobat Reader) with an undocumented command line parameter to actually do the physical printing to a specified printer (default, local or networked), monitors the print job to completion then terminates the Reader process (Acrobat doesn't terminate itself after the print) and finally deletes the temp file if all went well. Been working like a charm so far, but only works on Windoze boxes of course, due to the VBS dependency. If you want, ping me privately and I'll send you the Javascript and VBS scripts which should get you down the path of printing PDFs under program control. Andrzej Jan Taramina Chaeron Corporation: Enterprise System Solutions http://www.chaeron.com ------------------------------------------------------- This SF.net email is sponsored by: Perforce Software. Perforce is the Fast Software Configuration Management System offering advanced branching capabilities and atomic changes on 50+ platforms. Free Eval! http://www.perforce.com/perforce/loadprog.html _______________________________________________ iText-questions mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/itext-questions
