By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,825 Members | 1,255 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,825 IT Pros & Developers. It's quick & easy.

printing a pdf file from php

P: n/a
Hello, I need some help with printing pdf files through php. I have a
script that will create many pdf files but I want them printed. I
found this program to print pdf from the command line from
http://forum.planetpdf.com/webboard/...read?142106,52
and it works fine when I do the command

C:\pdfp -p "\\computer\LaserJet" "C:\Program
Files\xampp\htdocs\weeklyhomebuyers\temp\invoice4. pdf"

through start->run but when I try to do it through php using

function print_file($filename) {
$adobe_path='C:\pdfp -p "\\\computer\LaserJet"';
$output = shell_exec($adobe_path.' "'.$filename.'"');
echo $output;
}

print_file("C:\Program
Files\\xampp\htdocs\weeklyhomebuyers\\temp\invoice 4.pdf");

I get this for the output:
Printer: "\\rzfarrell\LaserJet" Printing: C:\Program
Files\xampp\htdocs\weeklyhomebuyers\temp\invoice4. pdf 1 File(s) Printed

but nothing happens. Anyone have any ideas?

Apr 4 '06 #1
Share this question for a faster answer!
Share on Google+

This discussion thread is closed

Replies have been disabled for this discussion.