Closed florentk closed 6 years ago
@kelson The PDF file contain errors when I lauch GS to create a JPG image, I got :
**** Error: Unknown operator: '0.00-40', processed as number, value: 0.0
Output may be incorrect.
**** Error: Unknown operator: '0.00-40', processed as number, value: 0.0
Output may be incorrect.
**** Error: Unknown operator: '0.0000-10498687', processed as number, value: 0.0
Output may be incorrect.
Then, GS put theses errors to std output !! And Convert can't read the generated JPEG correctly :
/usr/bin/gs -sDEVICE=jpeg -sOutputFile=- -dFirstPage=1 -dLastPage=1 -dSAFER -r150 -dBATCH -dNOPAUSE -q /var/www/html/w/images/0/08/Wikipédia_en_classe.pdf | convert -depth 8 -quality 95 -resize 320 - /tmp/transform_2159db7c3f5d.jpg
The solution is add -sstdout=%stderr
to GS command put I can't configure that for PdfHandler ...
@Anthere : The easiest is modify the PDF to not have an error.
@kelson42 Finnaly, I write a hack in Dockerfile :
{ \
mv /usr/bin/gs /usr/bin/gs9-20 ; \
echo '/usr/bin/gs9-20 -sstdout=%stderr $@' > /usr/bin/gs ; \
chmod a+x /usr/bin/gs ; \
}
fixed in 7008f92
Error for this file : http://wikifundi-fr.openzim.org/wiki/Fichier:Wikipédia_en_classe.pdf