PDA

View Full Version : PHP Generating documents with php and mysql



Patch^
May 9th, 2008, 06:43 PM
Howdy, tis me again. Got a question about making documents such as PDFs, Docs or even RTFs and Txt files.

I have read up on some tutorials for PDFs and Docs, but it seems as if I need a Windows Server, where as I have a Linux host. So I am unable to create dynamic documents and install any plugins or libraries as I'm on a shared host. So if you know of any simple classes or tutorials please let me know! :)

Basically I need it so that when a user clicks on a link it will generate information in the file and then download. Any file format will do I guess as longs as it stores the correct information and downloads etc.

any ideas and suggestions would be much appreciated!

Thank you!

Loyx
May 10th, 2008, 06:51 PM
You can create PDF's 'on the fly' with PHP in Linux without problems. Check this class and the example:

http://www.ros.co.nz/pdf/

Have you tried any class? Why you say that u need a windows server? That is a stupidity... PHP works much better over linux. In fact the Windows Server PHP is a "false" and very limited PHP.

In a shared host you cant install modules/libraries, only in excepcional cases (your isnt)

kitsunegari
May 11th, 2008, 10:00 AM
The simpliest way is to it with text files (dealing with pdf and rtf with php can really be a pain in the ***)
http://fr3.php.net/manual/en/function.fwrite.php