This content has been marked as final. Show 12 replies
to see it in img tag as source <imgYou could possibly map the image tag to an image servlet that would convert the html into an image. Or maybe I am missing out something really simple...
thanks can you post an example or any tutorial about it
Here's one suggestion. Swing has a component that displays html files (I think its the JEditorPane). Open the html file into that component, then create an image object, get the graphics object from that image object, and call the JEditorPane paint method using the graphics object from the image. Now the html file has been painted into the image object. Write that image out to file, and you're done.
But I have a web application and I can not use JEditorPane
Why? Is this web application not written in Java?
yes in java but I want not to use applet
there is other way ???
What do applets have to do with it?
in my.html there is a simple javscript editor to edit texts and upload images
after edit the text and upload an image I want to convert the content of this
editor to an image
how to do that ???
any helpAdam gave you the solution. I think what may have confused you is that the JEditorPane code executes on the server, not the client.
One question you haven't answered is this:
Why do you want to do this? What is your goal? I ask because there may be
simpler and smarter ways to achieve your goal, but so far you haven't described
your problem at all.
Let's start with what you would like to see in this image. Would you like an image that shows the source code of the HTML, starting with "<html>", for example?
I want to create a templete for business card
one write the data and upload the logo. I want to see this tamplete
incluisive texts and logo as an image.
how to convert this tamplete into image