I have a database driven website built with Django running on a Linux server. It manages many separate groups each with hundreds of users. It needs to be able to print customized docs (i.e. access credentials) on demand for one, some or all users. Each group has its own logo and each credential is customized with the user’s name, photo and some number of additional graphic stamps. All the custom information is based on stored data for the user.
I’m trying to determine the best method for formatting the credentials and printing. Here are the options I’ve come up with so far:
-
straight HTML formatting, using table tags to break the credential into cells to contain the custom text or graphics. This seems straightforward except it doesn’t seem to lend itself to printing a couple hundred credentials at once.
-
Starting with a doc template in the form of a PDF file and using available PDF command line toolkits to stamp in the custom information and append the multiple PDFs into a single file for printing. This also seems reasonable except that the cost of a server license for these toolkits is prohibitively expensive for Linux (>$500).
-
stand alone program running on the client that retrieves user data via a web service and does all the formatting and printing locally.
Are there other options? Any advice? Thanks for your help.
Solution was to use the open source ReportLab library to build up the PDF pages from scratch.
I could not find an inexpensive way to stamp the custom components into an existing PDF. ReportLab can do this, but only through their commercial product.
Works great though.