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.
Convert PDF to thumbnail JPG - no result
Re: Convert PDF to thumbnail JPG - no result
try this :
exec("convert '$pdfhost[0]', '-resize', '150x100', '$pdfthumb'");
exec("convert '$pdfhost[0]', '-resize', '150x100', '$pdfthumb'");
- 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
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?
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/
https://imagemagick.org/Usage/