From: Richard L. <ce...@l-...> - 2007-01-19 19:46:19
|
On Thu, January 18, 2007 4:50 pm, Melanie McClusky wrote: > Anybody know how to create .pdf's online. More details.. > > I have people taking a test, when they have completed the test, I need > the > report to output as a .pdf. The information that is to print out will > be > coming from information that is stored in a database. I've used http://php.net/pdf maybe a dozen times. Here's a simple example: http://uncommonground.com/engineers/cheatsheet.pdf http://uncommonground.com/engineers/cheatsheet.phps This one has no database variables, but you can probably work out that bit easily enough already. I find it a lot easier to think in "inches" and use "X * 72" all over the place. Here's one a bit more complicated: http://uncommonground.com/events.pdf http://uncommonground.com/events_pdf.phps This pulls a rather complicated query from the database, inserts JPG images, and dynamically chooses a font size between a range based on the amount of space the text needs for each date on the calendar. This one was done long before I figured out the * 72 trick... (The globals.inc just defines the 'pagetop' and 'pagebot' functions that are used in case of a total failure -- ignore it) You probably need something in between these two in terms of complexity. -- Some people have a "gift" link here. Know what I want? I want you to buy a CD from some starving artist. http://cdbaby.com/browse/from/lynch Yeah, I get a buck. So? |