exec() function, cmd, background printing

Ask about general coding issues or problems here.

Moderators: macek, egami, gesf

johnj
php-forum Super User
php-forum Super User
Posts: 1805
Joined: Thu Mar 10, 2011 5:07 pm

Re: exec() function, cmd, background printing

Post by johnj » Tue Jul 30, 2013 9:42 am

I downloaded foxitreader and tested what you are doing. I copied a pdf file to my root folder (I used xampp for this test, so it is the htdocs folder) and then used the following code:

Code: Select all

$ret = exec("C:\\PROGRA~1\\FOXITS~1\\FOXITR~1\\FOXITR~1.EXE /p Prospectus.pdf",$output,$temp);
var_dump($output);
var_dump($ret);
var_dump($temp);
When I ran the above php code, it did work. My pdf file was sent to the printer. see the output in the attached file.
Attachments
print.jpg
print.jpg (30.6 KiB) Viewed 958 times

lukasg
New php-forum User
New php-forum User
Posts: 14
Joined: Thu Jul 18, 2013 9:39 pm

Re: exec() function, cmd, background printing

Post by lukasg » Wed Jul 31, 2013 8:23 am

Great, tell me please on what OS ?

johnj
php-forum Super User
php-forum Super User
Posts: 1805
Joined: Thu Mar 10, 2011 5:07 pm

Re: exec() function, cmd, background printing

Post by johnj » Fri Aug 02, 2013 2:06 am

Windows 7 ultimate

lukasg
New php-forum User
New php-forum User
Posts: 14
Joined: Thu Jul 18, 2013 9:39 pm

Re: exec() function, cmd, background printing

Post by lukasg » Thu Aug 08, 2013 4:10 am

Many thanks for all your help and and the time spent on helping me :)

Post Reply

Who is online

Users browsing this forum: Bing [Bot] and 2 guests