Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

HTML page to jpeg Image

Status
Not open for further replies.

jlipsitz

Programmer
Jul 13, 2003
14
US
Hi

I was wondering if anyone had any suggestions on what the best way to write a program that given html could turn it into an image. Would it be possible to write the html to a JEditorPane and then somehow capture what the JEditorPane is displaying and save it as an image?

Thanks
 
>>> that given html could turn it into an image.

do you mean display an image in a html page - could you clarify ?
 
I think what jlipsitz wants is a 'screenshot' of the content of JEditorPane... doesn't make sense to me but that's what it sounds like.

patrick.metz@epost.de
 
the window that contains the html page should be drawn to screen using a 'Graphics' object. you can get acces to it by extending paintComponent(Graphics g) - in all swing and awt. it's the graphics object you will need to snapshot, but... ...i don't know how to do that. it shouldn't be too difficult, it's a process that's should be well documented for buffering purposes. hope i've pointed you in the right direction.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top