Forums Register Login

Html to jpg

+Pie Number of slices to send: Send
Hi Guys
Anyone know Converting Web pages to images using Java.

[ August 01, 2008: Message edited by: Rashmee H S ]
[ August 01, 2008: Message edited by: Rashmee H S ]
+Pie Number of slices to send: Send
Not sure what this has to do with EJB and Other Java EE technologies.

What is a n HTML request? Do you mean you want to create an image of a web page?
+Pie Number of slices to send: Send
I believe that you want to convert an HTML webpage to a JPEG file. If this is so, there are a couple of ways I know of to do so. The first one is the direct method, where you directly do the conversion using some swing classes, including JEditorPane. Your HTML code must be simple, since JEditorPane cannot render too complex pages. You can view two samples for the code to do this here (go to the end of the page if you are not a member) and here (requires registration).

The second method is an indirect one, but would be useful with complex pages, and if you don't want to use swing components. You can simply convert your HTML page to PDF using iText then convert this PDF to JPEG files using Adobe's java APIs, like in the following example. Of course in this solution you have to have Adobe's LiveCycle, which is proprietary. You can instead use ImageMagick instead.
[ July 30, 2008: Message edited by: Alaa Nassef ]
+Pie Number of slices to send: Send
Paper beats rock. Scissors beats tiny ad.
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com


reply
reply
This thread has been viewed 1728 times.
Similar Threads
Thanks MZ for SCEA 5 Study guide
File upload
java.lan g.AbstractMet hodError: oracle .jdbc.driver .OracleCon nection.prep areStat
The lion sleeps tonight
Struts
More...

All times above are in ranch (not your local) time.
The current ranch time is
Mar 28, 2024 23:08:06.