homepage Welcome to WebmasterWorld Guest from 54.225.1.70
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Pubcon Platinum Sponsor 2014
Visit PubCon.com
Home / Forums Index / Code, Content, and Presentation / PHP Server Side Scripting
Forum Library, Charter, Moderators: coopster & jatar k

PHP Server Side Scripting Forum

    
Print PDF Server Side
print pdf
zumbrujm




msg:3951731
 7:04 pm on Jul 13, 2009 (gmt 0)

hello,

I would like to use PHP to print a local pdf file on the server to a printer connected to the server. I have been looking at the printer extension for PHP, but I can't quite figure out how to make that print the pdf. The pdf file was originally created by the server using FPDF. Bottom line, *when* a new pdf is created, it should print out immediately. Any thoughts on how to make that happen, especially with the printer extension?
[uk2.php.net...]

Thanks.
John

 

stef25




msg:3953715
 2:40 pm on Jul 16, 2009 (gmt 0)

looks like that extension only prints data, not files. there are functions that will read the contents of a file (i think its called readfile()); use that to read the content of the pdf, stick it in a $variable and use that in the printer function.

no idea if that will work, but thats what id try first. shouldnt be more than 2-3 lines of code

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