I am happy to have found this forum because I can not run my script.
My version of convert ( my code is running under debian 9 ) :
Code: Select all
# convert -version
Version: ImageMagick 6.9.7-4 Q16 x86_64 20170114 http://www.imagemagick.org
Copyright: © 1999-2017 ImageMagick Studio LLC
License: http://www.imagemagick.org/script/license.php
Features: Cipher DPC Modules OpenMP
Delegates (built-in): bzlib djvu fftw fontconfig freetype jbig jng jp2 jpeg lcms lqr ltdl lzma openexr pangocairo png tiff wmf x xml zlib
I explain my problem. I need to turn a pdf into a jpg image. My pdf has many pages (250 pages) but after the transformation, I find only 75 pages.
Code: Select all
$output = exec('convert -density 150 -trim -limit thread 1 "./pdf/1.pdf" -quality 50 "./livres/0001/'.$file.'/1.jpg"' );
echo $output;
And then convert those smaller 1.jpg files and a smaller file for a thumbnail 1-thumb.jpg.
I would also like to know if we can limit the script to prevent it blocking the server.
I use -limit thread, is it useful.
Thank you in advance for your answer.
Even if I do not have all the answers, it will still be very good.
Stéphane