On Fri, January 18, 2008 12:14 pm, Balasubramanyam Ananthamurthy wrote:
> I'm fetching content from database and printing it on the browser. I
> want add an link on the same page "Click here to view it in PDF". Is
> it
> possible to do it using FPDF? If yes, how can I do this?

Actually, FPDF goes even further than that, and (sort of) lets you
overlay a "FORM" on top of a PDF -- which is probably overkill for
what you need.

There are several options for generating a PDF from your DB data,
actually, but this one was worked well for me for a long time:
http://php.net/pdf
Note that this has a kind of funky license setup for
commercial/non-commercial usage, so you may not find that appropriate
for your needs though.
In addition to the php.net examples, here is a web-based calendar that
you can also print out and put on your fridge:
http://uncommonground.com/events.htm
http://uncommonground.com/events.pdf

That would be useless to you without source:
http://uncommonground.com/events.phps
http://uncommonground.com/events_pdf.phps

A bit messy code, and a lot of layout stuff you don't need, but it is
a real-live working example :-)

-- 
Some people have a "gift" link here.
Know what I want?
I want you to buy a CD from some indie artist.
http://cdbaby.com/from/lynch
Yeah, I get a buck. So?

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to