pdf2swf works only on ssh

630 views Asked by At

i have the following execute command:

/usr/local/bin/pdf2swf -s centerx=1 -s bitmap -s jpegquality=85 -s zoomtowidth=1200 -s zoomtoheight=1000 -s zoom=100 -s framerate=0.25 -s subpixels=1.5 -S /test.pdf -o /test-%.swf

when i run it via ssh(putty for example) it works perfectly. but when i run it via php script like following:

<?php
exec("/usr/local/bin/pdf2swf -s centerx=1 -s bitmap -s jpegquality=85 -s zoomtowidth=1200 -s zoomtoheight=1000 -s zoom=100 -s framerate=0.25 -s subpixels=1.5 -S /test.pdf -o /test-%.swf");
?>

it doesnt work... please help me, thank you very much!

1

There are 1 answers

0
nigol On

You could try phpseclib, a pure PHP SSH implementation. Example:

<?php
include('Net/SSH2.php');

$ssh = new Net_SSH2('www.domain.tld');
if (!$ssh->login('username', 'password')) {
    exit('Login Failed');
}

echo $ssh->exec('pwd');
echo $ssh->exec('ls -la');
?>