Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Convert html to image

Posted on 2003-10-28
7
Medium Priority
?
296 Views
Last Modified: 2010-03-31
I want to take an html file and convert it to an image.  The reason I want to do this is so that I can produce a thumbnail size image of the html file for preview purposes.  I'm not sure if there's a better way to do this, but I'm open to suggestions.
0
Comment
Question by:wheth
  • 2
  • 2
5 Comments
 
LVL 92

Accepted Solution

by:
objects earned 2000 total points
ID: 9638572
You could render the page using JEditorPane and then use it's graphic context to paint the page to an image. It's (JEditorPane) HTML support is limited though and may not be sufficient for your needs. If not you'll need to find a component capable of satisfactoritly renderering the html, perhaps ICEBrowser.
0
 
LVL 86

Expert Comment

by:CEHJ
ID: 9640599
Ah *there* you are objects! Been on holiday?
0
 
LVL 35

Expert Comment

by:TimYates
ID: 9642010
0
 
LVL 92

Expert Comment

by:objects
ID: 9645483
Rugby World Cup is on over here.
0
 
LVL 86

Expert Comment

by:CEHJ
ID: 9652777
Wow - you *must* be pretty interested to let it drag you way from EE ;-)
0

Featured Post

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Java contains several comparison operators (e.g., <, <=, >, >=, ==, !=) that allow you to compare primitive values. However, these operators cannot be used to compare the contents of objects. Interface Comparable is used to allow objects of a cl…
Are you developing a Java application and want to create Excel Spreadsheets? You have come to the right place, this article will describe how you can create Excel Spreadsheets from a Java Application. For the purposes of this article, I will be u…
Video by: Michael
Viewers learn about how to reduce the potential repetitiveness of coding in main by developing methods to perform specific tasks for their program. Additionally, objects are introduced for the purpose of learning how to call methods in Java. Define …
This tutorial will introduce the viewer to VisualVM for the Java platform application. This video explains an example program and covers the Overview, Monitor, and Heap Dump tabs.
Suggested Courses

783 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question