aspose file tools
The moose likes Java in General and the fly likes Generating image from  html code. Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


Win a copy of Mongo DB Applied Patterns this week in the MongoDB forum
or a resume review from Five Year Itch in the Jobs Discussion forum!
JavaRanch » Java Forums » Java » Java in General
Reply Bookmark "Generating image from  html code. " Watch "Generating image from  html code. " New topic
Author

Generating image from html code.

Sandeep Ghosh
Ranch Hand

Joined: Jan 23, 2002
Posts: 145
Hi Friends,
I have a html code . I need to store the output of this html code as image in database. Problem is how to capture image of html code.
Thanks in adv for any help.
Sandeep
Ernest Friedman-Hill
author and iconoclast
Marshal

Joined: Jul 08, 2003
Posts: 24039
    
  13

This could mean all sorts of things. One possible scenario: you're writing a Java program, and at some point you have a file of HTML, and you need to make a sort of "screen shot" of that HTML page and store it in a database.
I would load the HTML into a JEditorPane, then use a third-party class to turn the image in the JEditorPane into a PNG file (there's one in particular out there I'm thinking of called "PNGEncoder",) then store the PNG file in the database.
Is this the scenario you're talking about? If so, which part of this do you want help with?


[Jess in Action][AskingGoodQuestions]
Sandeep Ghosh
Ranch Hand

Joined: Jan 23, 2002
Posts: 145
Thanks for the tips
I have few qustion.How could I load my html code into JEditorPane ,I am using strus,ejb,sevelt. How could I get the snapshot of this.
Thanks in adv
Sandeep
 
I agree. Here's the link: http://ej-technologies/jprofiler - if it wasn't for jprofiler, we would need to run our stuff on 16 servers instead of 3.
 
subject: Generating image from html code.
 
Similar Threads
itemcode to servlet
Showing image from servlet
Beginner game
Dynamic Image Creation
How to Upload an image to the database?