PDF file that contains images. In the following this is demonstrated by converting 3 pages (fails), each page one a time (success),
then 2 pages (fails):
Code: Select all
# gs -q -dBATCH -dNOPAUSE -sDEVICE=pdfwrite -dFirstPage=8 -dLastPage=10 -sOutputFile=three.pdf many.pdf
# convert -compress JPEG three.pdf convert3.pdf
Segmentation Fault (core dumped)
# gs -q -dBATCH -dNOPAUSE -sDEVICE=pdfwrite -dFirstPage=8 -dLastPage=8 -sOutputFile=one.pdf many.pdf
# convert -compress JPEG one.pdf convert3.pdf
# gs -q -dBATCH -dNOPAUSE -sDEVICE=pdfwrite -dFirstPage=9 -dLastPage=9 -sOutputFile=one.pdf many.pdf
# convert -compress JPEG one.pdf convert4.pdf
# gs -q -dBATCH -dNOPAUSE -sDEVICE=pdfwrite -dFirstPage=10 -dLastPage=10 -sOutputFile=one.pdf many.pdf
# convert -compress JPEG one.pdf convert5.pdf
# gs -q -dBATCH -dNOPAUSE -sDEVICE=pdfwrite -dFirstPage=8 -dLastPage=9 -sOutputFile=two.pdf many.pdf
# convert -compress JPEG two.pdf convert6.pdf
Segmentation Fault (core dumped)
Code: Select all
gdb convert
GNU gdb 6.8
Copyright (C) 2008 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law. Type "show copying"
and "show warranty" for details.
This GDB was configured as "sparc-sun-solaris2.8"...
(gdb) run -compress JPEG two.pdf convert6.pdf
Starting program: /usr/local/bin/convert -compress JPEG two.pdf convert6.pdf
[New LWP 1]
[New LWP 2]
[New LWP 3]
[New LWP 4]
[New LWP 5]
Program received signal SIGSEGV, Segmentation fault.
0xff1fc5f4 in CloneImage () from /usr/local/lib/libMagickCore.so.2
(gdb) where
#0 0xff1fc5f4 in CloneImage () from /usr/local/lib/libMagickCore.so.2
#1 0xff14535c in InjectImageBlob () from /usr/local/lib/libMagickCore.so.2
#2 0xfe6e7970 in WritePDFImage () from /usr/local/lib/ImageMagick-6.5.1/modules-Q16/coders/pdf.so
#3 0xff174f5c in WriteImage () from /usr/local/lib/libMagickCore.so.2
#4 0xff17530c in WriteImages () from /usr/local/lib/libMagickCore.so.2
#5 0xfefc2a6c in ConvertImageCommand () from /usr/local/lib/libMagickWand.so.2
#6 0x0001118c in main ()
As an aside, the single page conversions came out 2X bigger than the input.
Thanks.