Bonzo wrote:
You need ghostscript installed to read pdf files. I wonder if there is a problem there, although you said it worked OK from the command line.
ghostscript is installed, i have recently converted hundreds of pdf files to jpg by php, called it via command prompt: php file.php
el_supremo wrote:
exec("/usr/local/bin/convert 'abcde.pdf[0]' abcde.jpg 2>&1", $array);
Pete
quote doesnt change anything
here abc.php:
Code: Select all
<?php
system("/usr/local/bin/convert 'abcde.pdf[0]' 'abcde.jpg' 2>&1");
?>
execute via command prompt, works perfect:
# php abc.php
**** Warning: Fonts with Subtype = /TrueType should be embedded.
The following fonts were not embedded:
TimesNewRomanPS-BoldMT
TimesNewRomanPSMT
**** This file had errors that were repaired or ignored.
**** The file was produced by:
**** >>>> Acrobat Distiller 6.0 (Windows) <<<<
**** Please notify the author of the software that produced this
**** file that it does not conform to Adobe's published PDF
**** specification.
call it via browser the same abc.php, no jpg produce, report:
sh: gs: command not found convert: Postscript delegate failed `abcde.pdf': No such file or directory. convert: missing an image filename `abcde.jpg'.
/usr/local/bin/gs is executable (0755)
active directory is writable (0777)
info:
Centos 5
Apache 2.2.3
PHP 5.1.6
Ghostscript 8.60
ImageMagick 6.3.7
Bonzo wrote:This should fail as you have --version rather than -version
it's works! really...
# convert --version
Version: ImageMagick 6.3.7 11/17/07 Q16
http://www.imagemagick.org
Copyright: Copyright (C) 1999-2007 ImageMagick Studio LLC
thanks you all...