homepage Welcome to WebmasterWorld Guest from 54.211.219.178
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

    
Print current page to pdf using php
Print current page to pdf using php
beaudettee




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

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

 

dreamcatcher




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

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

beaudettee




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

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

coopster




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

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

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