# Generating documents with php and mysql

**URL:** <https://forum.kirupa.com/t/generating-documents-with-php-and-mysql/259904>\
**Category:** programming\
**Created:** [May 9, 2008, 10:43pm UTC](https://forum.kirupa.com/t/generating-documents-with-php-and-mysql/259904 "2008-05-09T22:43:58Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Patch](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/patch/32/1095_2.png) [@Patch](https://forum.kirupa.com/u/Patch)\
**Post date:** [May 9, 2008, 10:43pm UTC](https://forum.kirupa.com/t/generating-documents-with-php-and-mysql/259904/1 "2008-05-09T22:43:58Z")

</div>

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!

---

<div class="post-metadata">

**Author:** ![Loyx](https://avatars.discourse-cdn.com/v4/letter/l/e274bd/32.png) [@Loyx](https://forum.kirupa.com/u/Loyx)\
**Post date:** [May 10, 2008, 10:51pm UTC](https://forum.kirupa.com/t/generating-documents-with-php-and-mysql/259904/2 "2008-05-10T22:51:26Z")

</div>

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/](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)

---

<div class="post-metadata">

**Author:** ![kitsunegari](https://avatars.discourse-cdn.com/v4/letter/k/eb8c5e/32.png) [@kitsunegari](https://forum.kirupa.com/u/kitsunegari)\
**Post date:** [May 11, 2008, 2:00pm UTC](https://forum.kirupa.com/t/generating-documents-with-php-and-mysql/259904/3 "2008-05-11T14:00:28Z")

</div>

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](http://fr3.php.net/manual/en/function.fwrite.php)
