Welcome to WebmasterWorld Guest from 184.73.3.107

Forum Moderators: coopster & jatar k

Print current page to pdf using php

Print current page to pdf using php

   
7:53 pm on May 13, 2008 (gmt 0)

5+ Year Member



Good day all:

I have a page that has an embedded flash movie and I want to have the ability to allow the user to either click on a button or select a link that will use the php pdf lib class to print the current page out to a pdf file. So the workflow is:

1. user plays with flash calculator on web page
2. Once they get their results, they have the ability to (outside of the flash movie) either:
a. Select a link or
b. Click on a form button
which will output the entire page to a flash file that gets generated on-the-fly, then pops a dialog box for them to download the file.

Am I way off base here?

Thanks in advance for your consideration.

E

8:13 am on May 23, 2008 (gmt 0)

WebmasterWorld Senior Member dreamcatcher is a WebmasterWorld Top Contributor of All Time 10+ Year Member



Hi beaudettee,

As you`ve had no replies, I`m guessing this one has got people stumped. Did you have any joy yourself? I`ve bumped the topic back to the top in case people missed it the first time.

dc

1:25 pm on May 23, 2008 (gmt 0)

5+ Year Member



Thanks for checking in Dreamcatcher.

After re-reading my post it seems I screwed up!

Option "B" should really read:

"which will output the entire page to a PDF file that gets generated on-the-fly, then pops a dialog box for them to download the file."

Silly me. I know php has the ability to generate pdf's on the fly from text and images, just wasnt sure if it was also "smart" enough to prnt the current page as a pdf.

Thanks again and maybe I'll have more luck now!

E

12:59 am on May 24, 2008 (gmt 0)

WebmasterWorld Administrator coopster is a WebmasterWorld Top Contributor of All Time 10+ Year Member



You just need to send the correct headers out prior to the PDF output. The fpdf class has some examples.
 

Featured Threads

Hot Threads This Week

Hot Threads This Month