Solved

Convert html to image

Posted on 2003-10-28
7
269 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
7 Comments
 
LVL 92

Accepted Solution

by:
objects earned 500 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

Why You Should Analyze Threat Actor TTPs

After years of analyzing threat actor behavior, it’s become clear that at any given time there are specific tactics, techniques, and procedures (TTPs) that are particularly prevalent. By analyzing and understanding these TTPs, you can dramatically enhance your security program.

Join & Write a Comment

INTRODUCTION Working with files is a moderately common task in Java.  For most projects hard coding the file names, using parameters in configuration files, or using command-line arguments is sufficient.   However, when your application has vi…
Basic understanding on "OO- Object Orientation" is needed for designing a logical solution to solve a problem. Basic OOAD is a prerequisite for a coder to ensure that they follow the basic design of OO. This would help developers to understand the b…
Viewers will learn one way to get user input in Java. Introduce the Scanner object: Declare the variable that stores the user input: An example prompting the user for input: Methods you need to invoke in order to properly get  user input:
The viewer will learn how to implement Singleton Design Pattern in Java.

706 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

Need Help in Real-Time?

Connect with top rated Experts

21 Experts available now in Live!

Get 1:1 Help Now