convert pdf to jpg - with Terminal OK with PHP no...

Questions and postings pertaining to the usage of ImageMagick regardless of the interface. This includes the command-line utilities, as well as the C and C++ APIs. Usage questions are like "How do I use ImageMagick to create drop shadows?".
Post Reply
G4XTR

Re: convert pdf to jpg - with Terminal OK with PHP no...

Post by G4XTR »

$command = "convert /opt/local/bin/doc.jpg /opt/local/bin/img.pdf";
$output = shell_exec($command);

echo "<br>Shell Output:";
echo($output);
What does the shell respond?

Btw, your first jpg is called img, the other test. Also look at the file link, are both images in the same folder?
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: convert pdf to jpg - with Terminal OK with PHP no...

Post by fmw42 »

did you recompile IM after installing Ghostscript?

check if IM recognizes Ghostscript

convert -list configure

See line starting with DELEGATES. It should include gs

Do you have more than one Ghostscript installed?

Check your install logs to see if there were any errors in compiling Ghostscript or if IM thinks it was fully installed.
Post Reply