hello my English is bad.
when trying to run exec('convert *.png example.pdf') from php gives me a problem, I created a file with a size in bytes and not functional. It's as if it did not obtain any file.png, however if I go from ssh to the server and run "convert *.png Example.pdf" in the same directory as the file I created example.pdf.
Then I tried this: exec('convert file-0.png example.pdf') and believe me perfectly.
no filter. that if I work exec(echo *)
there is no way to specify the images to add to pdf?
try in php: exec('convert file-0.png, file-1.png example.pdf')
thanks in advance.
problem running convert *. png example.pdf from php
- fmw42
- Posts: 25562
- Joined: 2007-07-02T17:14:51-07:00
- Authentication code: 1152
- Location: Sunnyvale, California, USA
Re: problem running convert *. png example.pdf from php
You probably need to put the path to IM convert into your exec command
Try
<?php
echo "<pre>";
system("type -a convert");
echo "</pre>";
?>
to find the path to convert
Try
<?php
echo "<pre>";
system("type -a convert");
echo "</pre>";
?>
to find the path to convert
Re: problem running convert *. png example.pdf from php
look my problema i try this:
exec("convert file-0.png file-1.png file-2.png file-3.png file-4.png file-5.png FINAL0.pdf"); <--- failed 690bytes
exec("convert * FINAL0.pdf"); <--- failed 690bytes
exec("convert file-0.png file-1.png file-2.png file-3.png file-4.png FINAL0.pdf"); <--- works 1.25mb
i try via ssh:
convert file-0.png file-1.png file-2.png file-3.png file-4.png file-5.png FINAL0.pdf <--- works 1.90mb
-------
the php file is located in some directory that images.
that for response.
exec("convert file-0.png file-1.png file-2.png file-3.png file-4.png file-5.png FINAL0.pdf"); <--- failed 690bytes
exec("convert * FINAL0.pdf"); <--- failed 690bytes
exec("convert file-0.png file-1.png file-2.png file-3.png file-4.png FINAL0.pdf"); <--- works 1.25mb
i try via ssh:
convert file-0.png file-1.png file-2.png file-3.png file-4.png file-5.png FINAL0.pdf <--- works 1.90mb
-------
the php file is located in some directory that images.
that for response.