convert has errors and warnings but returns with 0

Post any defects you find in the released or beta versions of the ImageMagick software here. Include the ImageMagick version, OS, and any command-line required to reproduce the problem. Got a patch for a bug? Post it here.
Post Reply
jessp0110
Posts: 6
Joined: 2013-10-30T03:03:58-07:00
Authentication code: 6789

convert has errors and warnings but returns with 0

Post by jessp0110 »

Hi,

root@pa-encoder15 ~# convert -regard-warnings -density 400x400 -resize 940 -gravity center -extent 940 -colorspace RGB -limit memory 100 -limit map 200 /tmp/some.pdf /tmp/output/jess-%03d.jpg -debug
**** Error reading a content stream. The page may be incomplete.
**** File did not complete the page properly and may be damaged.
**** Warning: File has unbalanced q/Q operators (too many q's)
**** Error reading a content stream. The page may be incomplete.
**** File did not complete the page properly and may be damaged.
**** Warning: File has unbalanced q/Q operators (too many q's)

**** This file had errors that were repaired or ignored.
**** The file was produced by:
**** >>>> iText� 5.4.5-SNAPSHOT �2000-2013 1T3XT BVBA (ONLINE PDF SERVICES; licensed version) <<<<
**** Please notify the author of the software that produced this
**** file that it does not conform to Adobe's published PDF
**** specification.

root@pa-encoder15 ~# echo $?
0

Naturally, I need it to return 1 [or anything but 0 really] because the conversion has issues, namely: it is a PDF of 7 pages and pages 4 and 5 come out blank.

root@pa-encoder15 ~# convert -v
Version: ImageMagick 6.6.9-7 2012-08-17 Q16 http://www.imagemagick.org
Copyright: Copyright (C) 1999-2011 ImageMagick Studio LLC
Features: OpenMP

root@pa-encoder15 ~# uname -a
Linux pa-encoder15 3.5.0-42-generic #65~precise1-Ubuntu SMP Wed Oct 2 20:57:18 UTC 2013 x86_64 x86_64 x86_64 GNU/Linux

root@pa-encoder15 ~# cat /etc/issue
Ubuntu 12.04.3 LTS \n \l


Thank you for any assistance,
Post Reply