homepage Welcome to WebmasterWorld Guest from
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Become a Pro Member
Home / Forums Index / Code, Content, and Presentation / PHP Server Side Scripting
Forum Library, Charter, Moderators: coopster & jatar k

PHP Server Side Scripting Forum

Generating PDF files with PHP
Creating dynamic pdf files

 6:45 pm on Jan 4, 2007 (gmt 0)

Hi all,

I'm working on a project where I need to collect some user input via a webform and then generate a PDF file with that input.

The "output" needs to look like the company newsletter, with the headline formatted some graphics, etc. Can anyone tell me how php handles the formatting of a pdf? Do I just use html?




 6:55 pm on Jan 4, 2007 (gmt 0)

You need to use a special library to generate a PDF, since the format is a complex one. If you have a budget to spend, you can buy a commercial product (these tend to be fuller in features) or download one of the few free libraries such as FPDF (which is more primitive and hence fiddly).

There are other complicating factors such as the embedding of fonts but the documentation for your chosen library will cover these.

Jordo needs a drink

 7:22 pm on Jan 4, 2007 (gmt 0)

You could look here also... [us3.php.net...]


 8:55 pm on Jan 4, 2007 (gmt 0)

This is what you You are looking for [fpdf.org]


 9:05 pm on Jan 4, 2007 (gmt 0)

HenryO suggested FPDF, which is what I use.

FDPF won't do things like rotated text or fancy effects. However, I have never needed that. I have a couple of sites that happily spew out beautiful PDF documents on demand.

Here [tecnick.com] is an extruded project. I have no idea how good it is.

If you like pears, there's an extension there [pear.php.net] that might be useful. I don't really use Pear that much, as it tends to be total overkill on the sites I build. However, it is a great system.


 12:01 am on Jan 18, 2007 (gmt 0)

I use a non-module open source library. It is really easy to use. You can find it here [ros.co.nz]

Global Options:
 top home search open messages active posts  

Home / Forums Index / Code, Content, and Presentation / PHP Server Side Scripting
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved