Welcome to WebmasterWorld Guest from 54.146.246.4

Forum Moderators: coopster & jatar k

Message Too Old, No Replies

Print PDF Server Side

print pdf

     

zumbrujm

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

5+ Year Member



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

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

10+ Year Member



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