PDF conversion aborted

Questions and postings pertaining to the usage of ImageMagick regardless of the interface. This includes the command-line utilities, as well as the C and C++ APIs. Usage questions are like "How do I use ImageMagick to create drop shadows?".
Post Reply
gabdara
Posts: 1
Joined: 2016-07-14T06:46:43-07:00
Authentication code: 1151

PDF conversion aborted

Post by gabdara »

I'm having trouble converting PDF on a local installation of ImageMagick. I have the same installation on a server online and there it's working correctly.

OS: Ubuntu 14.04

Code: Select all

identify -version
Version: ImageMagick 7.0.2-4 Q16 x86_64 2016-07-13 http://www.imagemagick.org
Copyright: Copyright (C) 1999-2016 ImageMagick Studio LLC
License: http://www.imagemagick.org/script/license.php
Features: Cipher DPC HDRI OpenMP 
Delegates (built-in): autotrace bzlib djvu fftw fontconfig freetype gslib gvc jbig jng jpeg lcms lqr lzma openexr pangocairo png ps tiff webp wmf x xml zlib
First scenario: cherries.pdf
Command: convert cherries.pdf cherries.jpg -debug all
Last lines of debug:

Code: Select all

...
2016-07-14T17:14:47+03:00 0:02.550 2.540u 7.0.2 Resource convert[1416]: resource.c/AcquireMagickResource/314/Resource
  Map: 5.47MB/5.217MiB/512MiB
2016-07-14T17:14:47+03:00 0:02.550 2.540u 7.0.2 Coder convert[1416]: png.c/ReadOnePNGImage/2055/Coder
    Enter ReadOnePNGImage()
    IM version     = 7.0.2-4
    Libpng version = 1.2.50
2016-07-14T17:14:47+03:00 0:02.550 2.540u 7.0.2 Coder convert[1416]: png.c/ReadOnePNGImage/2068/Coder
      Zlib version   = 1.2.8
2016-07-14T17:14:47+03:00 0:02.550 2.540u 7.0.2 Coder convert[1416]: png.c/ReadOnePNGImage/2100/Coder
      Before reading:
      image->alpha_trait=0      image->rendering_intent=2
      image->colorspace=23
      image->gamma=0.454545
2016-07-14T17:14:47+03:00 0:02.550 2.540u 7.0.2 Coder convert[1416]: png.c/ReadOnePNGImage/2389/Coder
      PNG width: 2560, height: 1440
    PNG color_type: 6, bit_depth: 8
    PNG compression_method: 0
    PNG interlace_method: 0, filter_method: 0
2016-07-14T17:14:47+03:00 0:02.550 2.540u 7.0.2 Coder convert[1416]: png.c/ReadOnePNGImage/2405/Coder
      Found PNG iCCP chunk.
2016-07-14T17:14:47+03:00 0:02.550 2.540u 7.0.2 Coder convert[1416]: png.c/ReadOnePNGImage/2473/Coder
      Reading PNG iCCP chunk.
2016-07-14T17:14:47+03:00 0:02.550 2.540u 7.0.2 Coder convert[1416]: png.c/ReadOnePNGImage/2537/Coder
      Got a 2576-byte ICC profile not recognized as sRGB
Aborted
Second scenario: sample.pdf
The same command as in the first scenario this time works: convert sample.pdf sample.jpg
But because the image from this PDF is CMYK, I need to make a conversion to sRGB.
Command: convert sample.pdf -profile JapanColor2011Coated.icc -profile sRGB_v4_ICC_preference.icc sample.jpg -debug all
Last lines of debug:

Code: Select all

...
2016-07-14T17:20:53+03:00 0:01.550 1.540u 7.0.2 Pixel convert[1421]: pixel.c/SetPixelChannelMask/6268/Pixel
  colorprofile/JapanColor2011Coated.icc[07ffffff]
2016-07-14T17:20:53+03:00 0:01.550 1.540u 7.0.2 Pixel convert[1421]: pixel.c/LogPixelChannels/4324/Pixel
  colorprofile/JapanColor2011Coated.icc[3]
2016-07-14T17:20:53+03:00 0:01.550 1.540u 7.0.2 Pixel convert[1421]: pixel.c/LogPixelChannels/4408/Pixel
    0: red (update)
2016-07-14T17:20:53+03:00 0:01.550 1.540u 7.0.2 Pixel convert[1421]: pixel.c/LogPixelChannels/4408/Pixel
    1: green (update)
2016-07-14T17:20:53+03:00 0:01.550 1.540u 7.0.2 Pixel convert[1421]: pixel.c/LogPixelChannels/4408/Pixel
    2: blue (update)
2016-07-14T17:20:53+03:00 0:01.550 1.540u 7.0.2 Resource convert[1421]: resource.c/AcquireMagickResource/314/Resource
  Area: 12B/12B/16.707GB
2016-07-14T17:20:53+03:00 0:01.550 1.540u 7.0.2 Resource convert[1421]: resource.c/AcquireMagickResource/314/Resource
  Memory: 12B/64.97MiB/256MiB
2016-07-14T17:20:53+03:00 0:01.550 1.540u 7.0.2 Cache convert[1421]: cache.c/OpenPixelCache/3518/Cache
  open colorprofile/JapanColor2011Coated.icc[0] (Heap Memory, 1x1x3 12B)
Aborted
Both scenarios work on the online server installation.
I thought maybe it has something to do with resources and I've set into policy.xml, memory to 256MiB and map to 512MiB, but there's the same behavior.

Any help is appreciated!

Regards,
Gab
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: PDF conversion aborted

Post by fmw42 »

Do you have the same versions of Ghostscript on each system?

gs --version

Do you have the same sDEVICE specified in the relevant PDF (PS) line of the delegates.xml file on each system?
Post Reply