Hi,
This is not really a java question, but java is my language of choice
so I'm posting it here.
I have to print a great number of web report each day and I would like
to find a java solution that downloads the HTML (that's easy), renders
it somehow (hopefully there is not too much javascript) and prints it.
So I would be very happy to find a cheap or free HTML->PDF or HTML-
>Image java based solution.
Thanks!
Aaron Fude
Andrew Thompson - 26 Nov 2007 06:48 GMT
...
>I have to print a great number of web report each day and I would like
>to find a java solution that downloads the HTML (that's easy), renders
>it somehow (hopefully there is not too much javascript) and prints it.
>So I would be very happy to find a cheap or free HTML->PDF or HTML-
>>Image java based solution.
I might suggest JEditorPane for the rendering, but it
will still (in Java 6) fail to render most 'real world' web
pages as you or I might expect them, but there is also
the possibility to hook into the native browser, and use
that to print the pages.*
I am not sure quite why you would want to do the
intermediary conversion from HTML to either image
or PDF, since it will hardly 'gain' anything from the
conversion.
* For using the native browser, see JDIC.
<https://jdic.dev.java.net/>

Signature
Andrew Thompson
http://www.physci.org/
Lew - 26 Nov 2007 14:16 GMT
>> I have to print a great number of web report each day and I would like
>> to find a java solution that downloads the HTML (that's easy), renders
>> it somehow (hopefully there is not too much javascript) and prints it.
>> So I would be very happy to find a cheap or free HTML->PDF or HTML-
>> Image java based solution.
It doesn't work via the /strategy/ you suggest, but it achieve the /goal/ you
suggest: try iText.
<http://www.lowagie.com/iText/>

Signature
Lew
Gordon Beaton - 26 Nov 2007 14:37 GMT
> I have to print a great number of web report each day and I would
> like to find a java solution that downloads the HTML (that's easy),
> renders it somehow (hopefully there is not too much javascript) and
> prints it. So I would be very happy to find a cheap or free
> HTML->PDF or HTML- Image java based solution.
Google suggested this:
http://www.javaworld.com/javaworld/jw-04-2006/jw-0410-html.html
As far as retrieving the html document goes, I'd script it and use a
tool like curl or wget.
/gordon
--