TechTalkz.com Logo

Go Back   TechTalkz.com Technology & Computer Troubleshooting Forums > Tech Support Archives > Programing Languages > Java

Notices

Reply
 
Thread Tools Display Modes
Old 26-11-2007, 12:28 PM   #1
Aaron Fude
Guest
 
Posts: n/a
HTML to anything printable converter

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
  Reply With Quote
Old 26-11-2007, 12:28 PM   #2
Andrew Thompson
Guest
 
Posts: n/a
Re: HTML to anything printable converter

Aaron Fude wrote:
...
>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/>

--
Andrew Thompson
http://www.physci.org/

Message posted via JavaKB.com
http://www.javakb.com/Uwe/Forums.asp...neral/200711/1

  Reply With Quote
Old 26-11-2007, 08:29 PM   #3
Lew
Guest
 
Posts: n/a
Re: HTML to anything printable converter

> Aaron Fude wrote:
>> 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/>

--
Lew
  Reply With Quote
Old 26-11-2007, 08:29 PM   #4
Gordon Beaton
Guest
 
Posts: n/a
Re: HTML to anything printable converter

On Sun, 25 Nov 2007 22:08:55 -0800 (PST), Aaron Fude wrote:
> 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/j...0410-html.html

As far as retrieving the html document goes, I'd script it and use a
tool like curl or wget.

/gordon

--
  Reply With Quote
Reply

Thread Tools
Display Modes


Google
 


All times are GMT +5.5. The time now is 03:56 AM.


vBulletin, Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO
Copyright © 2005-2008, TechTalkz.com. All Rights Reserved - Privacy Policy
Valid XHTML 1.0 Transitional