Code: Select all
$img = new Imagick($pdf.'[0]'); // WRONG :(
$img = new Imagick($pdf.'[1]'); // OK :D
The error is the same as happened to me we see around the web:
Code: Select all
Fatal error: Uncaught exception 'ImagickException' with message
'PDFDelegateFailed `[ghostscript library]
-q -dQUIET -dSAFER -dBATCH -dNOPAUSE -dNOPROMPT
-dMaxBitmap=500000000 -dAlignToPixels=0 -dGridFitTT=2
"-sDEVICE=pam" -dTextAlphaBits=4 -dGraphicsAlphaBits=4 "-r72x72"
-dUseCIEColor -dFirstPage=1 -dLastPage=1
"-sOutputFile=/tmp/magick-1514TynhowIwvsS8%d"
"-f/tmp/magick-1514ToUFRp0QWKlG"
"-f/tmp/magick-1514zEMWRNGv55Od"':
-dname= must be followed by a valid token
@ error/pdf.c/InvokePDFDelegate/263'
in /home/domain/public_html/pdfPreview.php:46
Stack trace: #0 /home/domain/public_html/pdfPreview.php(46):
Imagick->__construct('./assets/whatsn...')
#1 {main} thrown in
/home/domain/public_html/pdfPreview.php on line 46
In my tests, this was happening with this version
Code: Select all
versionNumber: 1680
versionString: ImageMagick 6.9.0-0 Q16 x86_64 2016-05-05
I just think people of this cummunity should know about.