Convert PDF to thumbnail JPG - no result

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
Bonzo
Posts: 2971
Joined: 2006-05-20T08:08:19-07:00
Location: Cambridge, England

Re: Convert PDF to thumbnail JPG - no result

Post by Bonzo »

The first code example looks correct; try it with a pdf on your server first to see if it works ?
I assume the images directory is CHMOD 777.

P.S. When using something like image.psd[2] for the 3rd layer in a psd file I put 'image.psd[2]' in my php code. I am unsure what you would want to use; that may be your problem.
hina

Re: Convert PDF to thumbnail JPG - no result

Post by hina »

try this :

exec("convert '$pdfhost[0]', '-resize', '150x100', '$pdfthumb'");
User avatar
anthony
Posts: 8883
Joined: 2004-05-31T19:27:03-07:00
Authentication code: 8675308
Location: Brisbane, Australia

Re: Convert PDF to thumbnail JPG - no result

Post by anthony »

If this is your first PHP IM program, back off a bit and make sure you get IM working with PHP first.

See IM examples API and scripting...
http://www.imagemagick.org/Usage/api/#php

Often the PHP environment is not as complete as a command line environment due to apathetic system Administration. Especually things like PATH and LD_LIBRARY_PATH. Also check for error output. The 'exec 2>&1'' in the test scripts re-direct errors output by the command to the normal output of PHP so you can see them. That would be for testing only.


Any one have a better IM command line caller, that includes nice handling and reporting of error output?
Anthony Thyssen -- Webmaster for ImageMagick Example Pages
https://imagemagick.org/Usage/
Post Reply