Forum Moderators: coopster

Message Too Old, No Replies

Anyway that I can create a PDF catalogue from PHP database...

         

Timboo

9:34 am on Aug 6, 2004 (gmt 0)

10+ Year Member



Hi all

I've got a website with nearly 2000 products in 50 categories - is there a way to convert these into a usable catalogue format (ie. convert to pdf) complete with short text description, price, image etc... has any one tried this before?

Many thanks
tim.

pete_m

10:04 am on Aug 6, 2004 (gmt 0)

10+ Year Member



Hi Timboo

You can create PDF files programmatically from PHP.
See [edit]* link deleted *[/edit] for one such way.

I haven't done it in php myself, but the code looks simple enough.

[edited by: ergophobe at 9:16 pm (utc) on Aug. 6, 2004]
[edit reason] as per TOS [webmasterworld.com] [/edit]

dcrombie

11:09 am on Aug 6, 2004 (gmt 0)



I've used PHP to generate LaTeX and then latex2pdf to create PDF files. Gives you a lot of control but LaTeX is a horrible language to learn ;)

httpwebwitch

2:11 pm on Aug 6, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



I've created PDFs using web forms and a PHP/MySQL database. I used the free FPDF library, which is easy enough to use (it was still an uphill hike, but yes the FPDF class made it just slightly easier)

For small PDFs, it's a great way to create custom printable material. But very large PDF files take a lot of server resources to compile... You should consider caching or pre-processing.

The FPDF site has a few examples that can get you started. If you need others, sticky me and I'll send some sample code so you can see how it's done.

good luck!

ergophobe

4:16 pm on Aug 6, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



A couple of other free packages that might help, one from sourceforge and one from PEAR.

[pear.php.net...]

[sourceforge.net...]

Tom

httpwebwitch

7:20 pm on Aug 6, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



slightly off-topic - does anyone know what Adobe thinks of people creating PDF files using PHP? I suspect they'd be ticked that we're not using licenced Acrobat software.