Jump to content

PHP to Generate PDF Document(s)


SharkBait

Recommended Posts

I'm trying to convert my window apps into pretty little webapps using PHP and the only part that I will have trouble is the creation of PDFs.

The documents I would create can span multiple pages but they also include tabular data.

If I could create the output information in the form of HTML could I do the same thing with PHP?  I know I could just 'Print to PDF' kinda deal but I am looking for an automated way to do this.

The PDF will be created after they run the required steps and the file would be place in a particular location on the server so that it could be sync'd to another server.

The documents would pull from a MySQL database (customer information etc) and then the output would be pretty much be line items placed in various points down the length of the document. There are othe conditions as well but once I figure out how to get the basic information layed out on the PDF I can look into those later.

So what I am looking for is the ability to create PDFs on the fly from dynamically created PHP/MySQL output in a nice formatted way so that I can send it to Customs (yes Customs not Customers) ;)

Since I would show a table type structure of information, with PHP would I just have to go line by line and output the text, draw the lines and keep going down the page? Keeping track of the page length incase I need to go over I would then start on a new page? Or is the PHP's library for PDF smart enough to carry on the output to the subsiquent pages if they are needed?

:)
Link to comment
Share on other sites

  • 2 weeks later...
This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.