0

We tend to issue certificates to our members in the form of PDF files. Till now we have been doing this manually and now we wish to automate the certificate generation part.

We need a functionality whereby my site members should be prompted for the full name. As soon as they hit the Submit button, the PDF file should get generated embedding their name in it with the current date. We already have the certificate (in the form of PDF file) with our branding, design and other text in it. We just want that our member's name should get populated at a particular place within the PDF file.

Is it possible? or are there any apps which can do such a job for me?

Thanks!

Ankur Jain
  • 173
  • 5

3 Answers3

0

It's definitely possible. I've done dynamic generation of PDFs before using Django, so the first thing that came to mind was using ReportLab, however, to modify existing files with ReportLab requires buying their pro-level software, so I looked up something else and came across this:

https://stackoverflow.com/questions/1180115/add-text-to-existing-pdf-using-python

Using a combination of http://docs.djangoproject.com/en/dev/howto/outputting-pdf/ and http://pybrary.net/pyPdf/ should get you started if you want to roll your own Python/Django solution.

photoionized
  • 464
  • 2
  • 6
0

There is a way of doing this using PHP

The documentation can be found here - http://us.php.net/pdf

You are probably looking for this section in particular - http://us3.php.net/manual/en/function.pdf-fit-textline.php

RonanW.
  • 429
  • 2
  • 7
0

To have the best control over it especially formatting, I would put the entire thing into a PHP program to build the output which would include the customization. Then output a PDF for the user. Editing an existing PDF file can introduce more risk because the environment can change over time, and you wouldn't know about it until you hear complaints from the users.

Edward_178118
  • 955
  • 4
  • 15
  • 33