IM Convert PDF->JPG works in command line, not in PHP

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Here's a weird thing. I have a new Redhat machine, with PHP 5.2.6 and IM 6.4.8. The following works beautifully on the command line:

convert original.pdf new.jpg

But from PHP, it only works beautifully if I specify complete pathnames for convert, the original file, and the new file (that's OK, no problem), but it only works converting JPG and GIF images. As soon as I try to convert a PDF image, it fails:

<?php
$command_line = "/usr/local/imagemagick/bin/convert /var/www/html/ original.pdf /var/www/new.jpg";
system($command_line, $return_var);
?>

$return_var = 1. I don't have ghostscript, but I figured I don't need it since the PDF->JPG conversions works on the command line. Any suggestions?

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux