You are right, I upgraded ImageMagick before posting in this forim to check if the bug was corrected in the latest version.
Anyway, you can check now I got the delegates :
Code: Select all
Version: ImageMagick 6.9.2-5 Q16 x86_64 2015-11-01 http://www.imagemagick.org
Copyright: Copyright (C) 1999-2015 ImageMagick Studio LLC
License: http://www.imagemagick.org/script/license.php
Features: Cipher DPC OpenMP
Delegates (built-in): bzlib djvu fftw fontconfig freetype jbig jng jpeg lcms lqr lzma openexr pangocairo png tiff wmf x xml zlib
So I just checked to convert a PDF file to JPG, it worked on a first PDF :
Code: Select all
# convert ./S50145326/S50145326.pdf foo.jpg
# ll foo-*
-rw-r--r-- 1 root root 34125 Nov 1 21:54 foo-0.jpg
-rw-r--r-- 1 root root 41342 Nov 1 21:54 foo-10.jpg
-rw-r--r-- 1 root root 69734 Nov 1 21:54 foo-11.jpg
-rw-r--r-- 1 root root 45001 Nov 1 21:54 foo-12.jpg
-rw-r--r-- 1 root root 47790 Nov 1 21:54 foo-13.jpg
-rw-r--r-- 1 root root 58779 Nov 1 21:54 foo-14.jpg
-rw-r--r-- 1 root root 66049 Nov 1 21:54 foo-15.jpg
-rw-r--r-- 1 root root 77299 Nov 1 21:54 foo-16.jpg
-rw-r--r-- 1 root root 40018 Nov 1 21:54 foo-17.jpg
-rw-r--r-- 1 root root 4970 Nov 1 21:54 foo-18.jpg
-rw-r--r-- 1 root root 6515 Nov 1 21:54 foo-19.jpg
-rw-r--r-- 1 root root 202994 Nov 1 21:54 foo-1.jpg
-rw-r--r-- 1 root root 164793 Nov 1 21:54 foo-2.jpg
-rw-r--r-- 1 root root 60147 Nov 1 21:54 foo-3.jpg
-rw-r--r-- 1 root root 83852 Nov 1 21:54 foo-4.jpg
-rw-r--r-- 1 root root 66606 Nov 1 21:54 foo-5.jpg
-rw-r--r-- 1 root root 66652 Nov 1 21:54 foo-6.jpg
-rw-r--r-- 1 root root 65427 Nov 1 21:54 foo-7.jpg
-rw-r--r-- 1 root root 68638 Nov 1 21:54 foo-8.jpg
-rw-r--r-- 1 root root 34765 Nov 1 21:54 foo-9.jpg
Now, back on the previous malformed PDF:
Code: Select all
# convert 4_pub.pdf foo.jpg
**** Warning: An error occurred while reading an XREF table.
**** The file has been damaged. This may have been caused
**** by a problem while converting or transfering the file.
**** Ghostscript will attempt to recover the data.
**** Unknown operator: '467.690.228' looks like a malformed number, replacing with 0.
**** Unknown operator: 'cm1.006'
**** Unknown operator: '0.2m'
**** Unknown operator: '0.47.144-0.024' looks like a malformed number, replacing with 0.
**** Unknown operator: '-0566144-0794' looks like a malformed number, replacing with 0.
**** Unknown operator: '-0.60.2482.3581' looks like a malformed number, replacing with 0.
**** Unknown operator: '0.m'
**** Unknown operator: '53.2483cm'
**** Unknown operator: '0.4342483c735'
**** Unknown operator: '0.228.2483c97'
**** Unknown operator: 'Q1.144'
**** Unknown operator: '-0.65Q'
**** Unknown operator: '400.67683cm'
**** Unknown operator: '-0.0220.155' looks like a malformed number, replacing with 0.
**** Unknown operator: '0.67.' looks like a malformed number, replacing with 0.
**** Unknown operator: '23Q'
**** Unknown operator: '425.58515.604' looks like a malformed number, replacing with 0.
**** Unknown operator: '1Q'
**** Unknown operator: '4S'
**** Unknown operator: 'Q68515.389'
**** Unknown operator: 'S881'
**** Unknown operator: '1480.55515.50' looks like a malformed number, replacing with 0.
**** Unknown operator: '-0.0240.05' looks like a malformed number, replacing with 0.
**** Unknown operator: '0.098c'
**** Unknown operator: 'Q1Q'
**** Unknown operator: '1480.55515.794' looks like a malformed number, replacing with 0.
**** Unknown operator: '465.58515.739' looks like a malformed number, replacing with 0.
**** Unknown operator: 'Q508'
**** Unknown operator: '-0.05300.0270.025' looks like a malformed number, replacing with 0.
**** Unknown operator: '-0.0220.155' looks like a malformed number, replacing with 0.
**** Unknown operator: '0.67.' looks like a malformed number, replacing with 0.
**** Unknown operator: '23Q'
**** Unknown operator: 'c5'
**** Unknown operator: '-0.2230.077' looks like a malformed number, replacing with 0.
**** Unknown operator: '1Q'
**** Unknown operator: '4S'
**** Unknown operator: 'Q68514cm'
**** Unknown operator: '-0018c'
**** Unknown operator: 'S881'
**** Unknown operator: '0.261c'
**** Unknown operator: '1Q'
**** Unknown operator: '343.73121480.55514cm'
**** Unknown operator: '0.05c'
**** Unknown operator: '0.098c'
**** Unknown operator: 'Q1Q'
**** Unknown operator: '403.24221480155514c737'
**** Unknown operator: '465755514c68080'
**** Unknown operator: 'Q58'
**** Unknown operator: '067663c7092'
**** Unknown operator: '-0.05300.0270.02270.03' looks like a malformed number, replacing with 0.
**** Unknown operator: '0.00.0220.155' looks like a malformed number, replacing with 0.
**** Unknown operator: '-0.4Q'
**** Unknown operator: '477.58363c489'
**** Unknown operator: '0.2134c'
**** Unknown operator: '1Q'
**** Unknown operator: '4S'
**** Unknown operator: '758363c272'
**** Unknown operator: '-0018c'
**** Unknown operator: 'S887'
**** Unknown operator: '0.263c'
**** Unknown operator: '1Q'
**** Unknown operator: '343.73121480.55513.389' looks like a malformed number, replacing with 0.
**** Unknown operator: '-0.6370.05c'
**** Unknown operator: 'Q.0'
**** Unknown operator: '297c'
**** Unknown operator: 'Q1.1q'
**** Unknown operator: '343.73121480258363c67890'
**** Unknown operator: '465755513c62.37'
**** Unknown operator: '-0.15c'
**** Unknown operator: 'Q008'
**** Unknown operator: '0.06270.031' looks like a malformed number, replacing with 0.
**** Unknown operator: '0.00.0220.155' looks like a malformed number, replacing with 0.
**** Unknown operator: '-0.4Q'
**** Unknown operator: '0.03Q'
**** Unknown operator: '02cm'
**** Unknown operator: '4S'
**** Unknown operator: 'Q6851'
**** Unknown operator: '-0018c'
**** Unknown operator: 'S886'
**** Unknown operator: '0.261c'
**** Unknown operator: '1Q'
**** Unknown operator: '02c33120'
**** Unknown operator: '-0.0240.05c'
**** Unknown operator: '0.097c'
**** Unknown operator: 'Q1Q'
**** Unknown operator: '1480258362c62.37'
**** Unknown operator: 'Q008'
**** Unknown operator: '-0.0220.158' looks like a malformed number, replacing with 0.
**** Unknown operator: '-06Q'
**** Unknown operator: '1Q'
**** Unknown operator: '4S'
**** Unknown operator: '-0018c'
**** Unknown operator: 'S881'
**** Unknown operator: '-0.6370.05' looks like a malformed number, replacing with 0.
**** Unknown operator: '0.098c'
**** Unknown operator: 'Q1Q'
**** Unknown operator: '403.24221480258360.66367' looks like a malformed number, replacing with 0.
**** Unknown operator: 'Q508'
**** Unknown operator: '-0.05300.08' looks like a malformed number, replacing with 0.
**** Unknown operator: '-0.621.1041' looks like a malformed number, replacing with 0.
**** Unknown operator: '0.237c'
**** Unknown operator: '1Q'
**** Unknown operator: '4S'
**** Unknown operator: '75836-0.9' looks like a malformed number, replacing with 0.
**** Unknown operator: '-0018c'
**** Unknown operator: 'S887'
**** Unknown operator: '0c'
**** Unknown operator: '0.051c'
**** Unknown operator: 'Q.0'
**** Unknown operator: '296c'
**** Unknown operator: 'Q1Q'
**** Unknown operator: '465.58510.448' looks like a malformed number, replacing with 0.
**** Unknown operator: '-0.3c'
**** Unknown operator: 'Q508'
**** Unknown operator: '59m'
**** Unknown operator: '23Q'
**** Unknown operator: '59m26890'
**** Unknown operator: '1Q'
**** Unknown operator: '4S'
**** Unknown operator: 'Q68559m.2010'
**** Unknown operator: '-0018c'
**** Unknown operator: 'S886'
**** Unknown operator: '0.261c'
**** Unknown operator: '1Q'
**** Unknown operator: '343.73121480258359m155'
**** Unknown operator: '0.05c'
**** Unknown operator: '0l'
**** Unknown operator: '296c'
**** Unknown operator: 'Q1Q'
**** Unknown operator: '403.24221480258359m'
**** Unknown operator: '59m389'
**** Unknown operator: 'Q58'
**** Unknown operator: '-0.0220.158' looks like a malformed number, replacing with 0.
**** Unknown operator: '0.237c'
**** Unknown operator: '1Q'
**** Unknown operator: '4S'
**** Unknown operator: '-002c'
**** Unknown operator: 'S881'
**** Unknown operator: '0.26c'
**** Unknown operator: '1Q'
**** Unknown operator: '343.731214802583580.9' looks like a malformed number, replacing with 0.
**** Unknown operator: '-0.0240.05c'
**** Unknown operator: '0.097c'
**** Unknown operator: 'Q1Q'
**** Unknown operator: '-0.17c'
**** Unknown operator: 'Q5080'
**** Unknown operator: '0.23Q'
**** Unknown operator: '403.54882051.58357.12810' looks like a malformed number, replacing with 0.
**** Unknown operator: '6S'
**** Unknown operator: '0.367c'
**** Unknown operator: 'Q1.20504406177'
**** Unknown operator: '-0.0140.25' looks like a malformed number, replacing with 0.
**** Unknown operator: '-0402c'
**** Unknown operator: 'S864'
**** Unknown operator: '-080Q'
**** Unknown operator: '-02Q58'
**** Unknown operator: '343.73123.835' looks like a malformed number, replacing with 0.
**** Unknown operator: '-4Q'
**** Unknown operator: '0..034q'
**** Unknown operator: '403.54882084084505.139' looks like a malformed number, replacing with 0.
**** Unknown operator: 'S3084l'
**** Unknown operator: '004l'
**** Warning: Invalid operator '-' is assumed to be a number 0.
**** Warning: Invalid operator '-' is assumed to be a number 0.
**** Unknown operator: '61Q'
**** Unknown operator: '0442l'
**** Unknown operator: '0l'
**** Unknown operator: '403.54880.3.186505.0402c'
**** Unknown operator: '-0105c'
**** Unknown operator: 'QQ'
**** Unknown operator: '-0326cl'
**** Unknown operator: '-04084l'
**** Unknown operator: '-05064l'
**** Unknown operator: '0.253Q'
**** Unknown operator: '-0526cl'
**** Unknown operator: '2c697c'
**** Unknown operator: '-4Q'
**** Unknown operator: '403.54882.2631' looks like a malformed number, replacing with 0.
**** Unknown operator: '-0.4504l'
**** Unknown operator: '-03.1-0.231' looks like a malformed number, replacing with 0.
**** Unknown operator: '-0.05300.07' looks like a malformed number, replacing with 0.
**** Unknown operator: '-0.081220.154' looks like a malformed number, replacing with 0.
**** Unknown operator: '226c'
**** Unknown operator: '0Q'
**** Unknown operator: '-0.26c'
**** Unknown operator: '-0.06c'
**** Unknown operator: 'S82'
**** Unknown operator: 'S010'
**** Unknown operator: '403.54882051.5858' looks like a malformed number, replacing with 0.
**** Unknown operator: '-0.05300.01' looks like a malformed number, replacing with 0.
**** Unknown operator: 'Q.0'
**** Unknown operator: '-0.05Q'
**** Unknown operator: 'S02022-0.154'
So if my PHP script tries to automatically convert such kind of malformed PDF, the script hangs.
Is there a way to check what is wrong with these PDF files and why does the error cannot be catched ? I can send you the PDF files if needed for troubleshooting.
Thank you for your help,
++