Easiest and fastest way to template, possibly in a PDF

164 views Asked by At

I have been looking extensively for a simple solution to a not-very-complicated problem.

I have a great deal of data in a sql database which needs to be printed (for example, each entry would have name, address, phone number, etc).

The vast majority of the data on the eventual printed page is static- there would only need to be a small handful of fields that need to be 'variables' in the 'template'. Quite beneficially the areas that the variable data would be dropped into are themselves in both location orientation and dimensions fixed-- so there need be no adjustments to spacing for the other static/redundant data on the page.

I would like to have some form of 'accounting' in the sense that, since the amount of pages printed are going to be on the order of the tens of thousands, I would like to know which sql entries have been printed thus far.

I would not like to 'reinvent the wheel' and write a php front end which loops through arrays and deposits the sql data onto the right place on the page before or after it is rendered as pdf...

I would prefer to print directly from the server (*nix), and would be very enthusiastic if there is a way to do this without actually having to render tens of thousands of individual pdfs. With todays open source software packages, which route is the best to take?

(so far, it is looking like if there isn't a simple way, I am going to need to learn LaTeX, Cheetah, and some python)

1

There are 1 answers

0
Paul McNett On

Dabo's report writer is a banded reporting engine like Crystal, which takes as input a set of data (output of cur.fetchall(), for example) and a report template (xml string or file), and outputs a PDF or set of PDF's (it can output a stream of bytes instead of writing to a file directly, if desired).

Dabo's main purpose is a desktop-application framework on top of wxPython, but the reporting can be done on the web with no desktop interaction. Though it does help to design the reports using the desktop though using the included report designer.

http://dabodev.com

There will be some installation hurdles and a learning curve, but you'll find this to be an easy task once you are ramped up.