Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsWhite Papers
Discussion GroupsFirst AidDatabasesJavaBeansGUIJava 3DVirtual MachineCORBASecurityToolsGeneral
Java DirectoryOpen Source ProjectsSample Book ChaptersUser GroupsWeb Resources
Related Topics
Databases.NETMore Topics ...

Java Forum / General / November 2007

Tip: Looking for answers? Try searching our database.

HTML to anything printable converter

Thread view: 
Aaron Fude - 26 Nov 2007 06:08 GMT
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

--


Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.