0

Thanks in Advance. I am working on JSP Platform and I have a requirement wherein I need to provide a membership card which will have an image as the Background with all the details like name, telephone number, Membership ID and other personal details. All these details will be captured in a form and then displayed over the card image with the details. But when the html form is submitted the data is saved in MYSQL and the JSP page displays the Card with the details on its desired position. What I am looking at is that is there a way to make that card image along with the details appear as an image which the user can directly download coz now if the user is trying to download he just gets the Blank background image without any data. Is there a way to merge the card image and the data as a single image or something which can easily be downloaded and also sent as an image to the users email.

InkTekSol
  • 67
  • 1
  • 1
  • 8
  • 1
    Try placing the text on the image itself. You'll have to do this on the server side then serve the image to the user. Here's an example of how to generate the image. https://stackoverflow.com/questions/10929524/how-to-add-text-to-an-image-in-java – Adam Jul 24 '15 at 19:36
  • Thank you very Much Adam. Your Solution actually solved my problem but now I m stuck again with another problem. I am working on a Web Application. Below is the Project Folder Mapping. WEB-APPLICATION>>WEB-PAGES>>IMAGES>>IMAGE.PNG. The image is located at this location. Then I have created my Java Class which needs to read this image from the above mentioned location and then write the result Image on different folder within IMAGES like IMAGES>>CARDS>>final.png..........how do I achieve this. coz the solution which Adam gave me works fine but the same code doesnt work with my web application. – InkTekSol Jul 28 '15 at 15:22

1 Answers1

0

You want something like a screenshot, right?

Here a tool to convert HTML source to pdf:

http://wkhtmltopdf.org/

This post can also help:

Convert web page to image

Community
  • 1
  • 1
Eduardo Briguenti Vieira
  • 4,351
  • 3
  • 37
  • 49