![]() |
printing HTML from Swing app in Windows ...
Hello all,
I have a Swing application that dynamically generates HTML documents, I need to let the user print the document but because of the little support of HTML flavor I could not have the Print Service API working for me. Another important remark is that this app is currently only used in Windows. Is there a way to have the explorer directly print the html document I have tried something like e.g. Runtime.getRuntime().exec("explorer -print " + url.toString()); using the Windows Shell but does not work i.e. explorer does not print directly a file. Thanks in advance, Best Regards, Giovanni |
Re: printing HTML from Swing app in Windows ...
"Giovanni Azua" <bravegag@hotmail.com> wrote in message news:<2rtktjF1e6sjhU1@uni-berlin.de>...
> Hello all, > > I have a Swing application that dynamically > generates HTML documents, I need to let the > user print the document but because of the > little support of HTML flavor I could not have > the Print Service API working for me. > > Another important remark is that this app is > currently only used in Windows. Is there a way > to have the explorer directly print the html > document I have tried something like e.g. > > Runtime.getRuntime().exec("explorer -print " + url.toString()); > Giovanni, post to an IE group. I think the Windows Scripting Host (WSH) will probably be what you are looking for to cause IE to print. Or maybe an old-school Windows app that sendMessage. One other lazy way will be to put a JavaScript in each HTML file. onload it can call to print. Best luck, Tim > using the Windows Shell but does not work > i.e. explorer does not print directly a file. > > Thanks in advance, > Best Regards, > Giovanni |
Re: printing HTML from Swing app in Windows ...
On Tue, 28 Sep 2004 19:17:30 +0200, Giovanni Azua wrote:
>Hello all, > >I have a Swing application that dynamically >generates HTML documents, I need to let the >user print the document but because of the >little support of HTML flavor I could not have >the Print Service API working for me. > Hello, Using JEditorPane, you render and then print HTML documents. I've used the DocumentRenderer class to print: http://www.ftponline.com/javapro/cod...e=jpep021210kg (I implemented my own printable jeditorpane first, but this one was slightly better, like multiple page. -- Gerbrand van Dieijen |
| All times are GMT. The time now is 09:39 PM. |
Powered by vBulletin®. Copyright ©2000 - 2013, vBulletin Solutions, Inc.
SEO by vBSEO ©2010, Crawlability, Inc.