Error when converting large PDFs to JPEG

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
blokey

Error when converting large PDFs to JPEG

Post by blokey »

Hi, I'm experiencing the following error on a host when converting certain PDFs with in excess of 200 pages to JPEG:

Code: Select all

Error: /ioerror in --showpage--
Operand stack:
   --nostringval--   1   true
Execution stack:
   %interp_exit   .runexec2   --nostringval--   --nostringval--   --nostringval--   2   %stopped_push   --nostringval--   --nostringval--   --nostringval--   false   1   %stopped_push   1905   1   3   %oparray_pop   1904   1   3   %oparray_pop   1888   1   3   %oparray_pop   --nostringval--   --nostringval--   130   1   205   --nostringval--   %for_pos_int_continue   --nostringval--   --nostringval--   1777   1   9   %oparray_pop   --nostringval--   --nostringval--
Dictionary stack:
   --dict:1153/1684(ro)(G)--   --dict:1/20(G)--   --dict:75/200(L)--   --dict:75/200(L)--   --dict:106/127(ro)(G)--   --dict:275/300(ro)(G)--   --dict:22/25(L)--   --dict:4/6(L)--   --dict:22/40(L)--
Current allocation mode is local
Last OS error: 28
Command line used:

Code: Select all

convert -colorspace Transparent -quality 90% -density 112x112 -filter lanczos -resize '450x650>' source.pdf page.jpg
Version of ImageMagick: 6.4.3, gs: 8.63.

I'm not sure if this is a problem with ImageMagick or GhostScript, but the conversion is successful with ImageMagick 6.3.7 / gs 8.62 on another machine. Could it be a resource limit problem? I'd appreciate any insight! Cheers.
User avatar
magick
Site Admin
Posts: 11064
Joined: 2003-05-31T11:32:55-07:00

Re: Error when converting large PDFs to JPEG

Post by magick »

To track the problem we need to reproduce it. Can you post a URL to a sample PDF or send a PM?
blokey

Re: Error when converting large PDFs to JPEG

Post by blokey »

Thanks for the quick response. One PDF that fails is here:
http://www.msccruises.co.uk/downloads/u ... 202009.zip

Apologies for the size (~50MB).
User avatar
magick
Site Admin
Posts: 11064
Joined: 2003-05-31T11:32:55-07:00

Re: Error when converting large PDFs to JPEG

Post by magick »

Add -limit memory 1mb -limit map 1mb to your command line. The conversion completed for us-- we're using ImageMagick-6.4.4-1.
blokey

Re: Error when converting large PDFs to JPEG

Post by blokey »

The -limit arguments worked a treat! There was also a permissions issue with the location of the temporary files, so it's all fixed now. Thanks for your help.
Post Reply