Web Hosting Talk







View Full Version : Outputting database info to PDF file


Noel4DMB
11-10-2003, 12:02 PM
Anyone know of any tutorials for this?

To be more specific, I need to draw up a script that gives the option for aligning photos in landscape or letter form, and then outputs that align option with photos from the database into a PDF file for printing.

I have an idea of how its going to work, but I need solid documentation to guide me along the way. Can anyone help me out? Thanks!

Burhan
11-10-2003, 12:38 PM
Here is my suggestion. Grab pdflib (not free for commercial use), or if you are stripped for cash fpdf.org has a free pdf library.

Use those libraries with something like PHP to generate your PDF files.

As far as the database goes, you can extract the information however you like, but if you are using MySQL 4.x+, it has an option to return results as xml -- which can come in handy.

You may also want to look into XML-FO (which transforms XML documents into almost any format you can imagine, including PDF). IBM has an excellent tutorial on using XML-FO (called toot-o-matic) that you can download to explore that further.

sylow
11-11-2003, 05:57 AM
If you have python skills then go for www.reportlab.com
Very nice library for pdf creation