I want to print an html page directly from my application. It should not show the html page. If I click on some button, directly it should print y html document.
posted 9 years ago
That's tricky. You need a component that can render HTML to do that, and there are few of those around. JEditorPane can render HTML 3.2 (no CSS), but it may be possible to get it to print without actually showing it on the screen.
Another possibility might be to use the OpenOffice Java API. OO can open (some?) HTML files, and in server mode it doesn't show a GUI, so you can instruct it to print the open document.