Board index   FAQ   Search  
Register  Login
Board index php forum :: php coding PHP coding => General

exec() function, cmd, background printing

Ask about general coding issues or problems here.

Moderators: macek, egami, gesf

Re: exec() function, cmd, background printing

Postby 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 488 times
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

Postby lukasg » Wed Jul 31, 2013 8:23 am

Great, tell me please on what OS ?
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

Postby johnj » Fri Aug 02, 2013 2:06 am

Windows 7 ultimate
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

Postby lukasg » Thu Aug 08, 2013 4:10 am

Many thanks for all your help and and the time spent on helping me :)
lukasg
New php-forum User
New php-forum User
 
Posts: 14
Joined: Thu Jul 18, 2013 9:39 pm

Previous

Return to PHP coding => General

Who is online

Users browsing this forum: No registered users and 1 guest

Sponsored by Sitebuilder Web hosting and Traduzioni Italiano Rumeno and antispam for cPanel.