I'am working on online training site. When user finished the course I would like to generate downloadable diploma for them. They could print it and hang it on the wall. It should be graphically attractive and contain their personal details. Perfect solution for me would be:

  • Graphic designer creates diploma in Photoshop or similar tool with placeholders for user data
  • Application takes this file
  • Fills placeholders with user data
  • Generates file in some user friendly format easy to print (PNG? PDF? I am not sure...)

My web application is written Java. Do you know any tools suitable for that?

  • DOC|DOCX|ODT -> PDF mail merging is a reasonable approach. Design can be done using Word / Libre Office and use something like JODReports or Docmosis to manipulate from Java into PDF. Jun 18, 2016 at 9:43
  • This won't be secure though. You could do something like a digital signature in the metadata, but that's for Information Security Jul 1, 2016 at 18:56
  • @CJM I rejected your edit. meta.stackexchange.com/questions/223412/…
    – user416
    Feb 24, 2018 at 16:28

3 Answers 3


Using LaTeX

You could design the diploma with LaTeX, and programmatically fill out the dynamic fields. Then you could make a system call to pdflatex from Java and have the diploma generated. This solution is powerfull and easy - but probably only if you know LaTeX. There is stackexchange community though: https://tex.stackexchange.com/


If you can integrate PHP into your web application, or adapt this to Java...

Follow the tutorials at this link http://koivi.com/fill-pdf-form-fields and you will be able to create an excellent solution to dynamically fill PDF forms that can be emailed or downloaded. Your graphic designer should be able to create just about anything desired and save as PDF.

I have used this with tremendous success!

Good luck!

  • I've done this, creating a PDF form in OpenOffice, then generating FDF data from that, then dynamically create PDF on the fly, then stamping some images on it (water mark, QR code for verification, etc)
    – ivanivan
    Dec 29, 2016 at 16:26


ImageMagick is an image manipulation library which works from command line. You don't even need Java, but you could use Java to run the program.

ImageImagick supports all kind of image formats, including PNG and JPG.

It is able to draw text on images as well.

Plain Java

Java has the BufferedImage class. Call getGraphics() and then use drawString() to write text onto the picture.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.