Page 1 of 1

Ahhh! IM and Ghostscript no longer working together.

Posted: 2007-10-03T23:37:05-07:00
by SteveC
The hard drive on our linux server was failing, so we had the techs at the company who houses our dedicated server change out the hard drive. Now, after reinstalling the OS and upgrading ImageMagick to 6.3.6 and Ghostscript to 8.60, I can no longer create images of PDF files. I get the following error message when running from the command line:

Code: Select all

   **** Warning: CS/cs (setcolorspace) operand not a name: [/ICCBased {77 0 resolveR}] ****
Error: /rangecheck in --run--
Operand stack:
   --dict:12/12(L)--   1.0   --dict:12/12(L)--   1   HeBO
Execution stack:
   %interp_exit   .runexec2   --nostringval--   --nostringval--   --nostringval--   2   %stopped_push   --nostringval--   --nostringval--   --nostringval--   false   1   %stopped_push   1889   1   3   %oparray_pop   1888   1   3   %oparray_pop   1872   1   3   %oparray_pop   --nostringval--   --nostringval--   2   1   1   --nostringval--   %for_pos_int_continue   --nostringval--   --nostringval--   false   1   %stopped_push   --nostringval--   --nostringval--
Dictionary stack:
   --dict:1154/1684(ro)(G)--   --dict:2/20(G)--   --dict:75/200(L)--   --dict:75/200(L)--   --dict:106/127(ro)(G)--   --dict:274/300(ro)(G)--   --dict:21/25(L)--   --dict:4/6(L)--   --dict:21/40(L)--   --dict:19/23(L)--   --dict:1/1(ro)(G)--
Current allocation mode is local
Last OS error: 2
GPL Ghostscript 8.60: Unrecoverable error, exit code 1
convert: Postscript delegate failed `test.pdf': No such file or directory.
convert: missing an image filename `test.jpg'.
It is extremely important that I get this fixed ASAP because our customers upload PDF's all the time and thumbnails need to be created of the first page of each PDF. I tried going back to Ghostscript 8.15 (that's what we were using prior to the hard drive failure and it worked great), but still got errors.

I noticed other, older posts from people having the same problems but the only responses that I saw were to upgrade to the newest versions. However, I am using the newest versions, so that can't be it.

Any ideas? This is an urgent issue for us, so any help you can give would be greatly appreciated. Thanks!

Re: Ahhh! IM and Ghostscript no longer working together.

Posted: 2007-10-04T06:25:02-07:00
by magick
We cannot reproduce the problem:
  • convert logo: logo.pdf
    convert logo.pdf logo.png
works for us. Try these commands and let us know if they fail for you. If not, perhaps the problem is specific to your PDF's. Post one here and we'll see if we can reproduce the problem.

Re: Ahhh! IM and Ghostscript no longer working together.

Posted: 2007-10-04T06:36:38-07:00
by SteveC
I've got to the point where the error is now: Error: /invalidfont in /findfont

Most of the PDF files I tried at http://koyaanisqatsi.imagemagick.org/Ma ... Studio.cgi failed as well.

The problem appears to be core Windows fonts not being available. I installed msttcorefonts, but now have to figure out how to get ImageMagick and/or Ghostscript to use them. Is there an easier way than adding each font manually to the type-windows.xml file? If I add all the msttcorefonts to type-windows.xml, will that solve the missing font problem or do I need to figure out how to get Ghostscript to read the fonts as well?

Thanks.

Re: Ahhh! IM and Ghostscript no longer working together.

Posted: 2007-10-04T06:43:27-07:00
by SteveC
I appears that only a few core fonts are missing from type-windows.xml, Georgia and Trebuchet MS. It looks like everything else is already in there. Still, do I need to figure out how to add these fonts to Ghostscript, too?

Thanks

Re: Ahhh! IM and Ghostscript no longer working together.

Posted: 2007-10-04T11:29:11-07:00
by SteveC
Ok. I've figured out on font issue. For some unknown reason Ghostscript was looking for the fonts in different folders than where they were installed. So, that's fixed.

But, my PHP script isn't working yet. The convert command works from the command line, but not in the PHP script. :(

Re: Ahhh! IM and Ghostscript no longer working together.

Posted: 2007-10-04T11:46:03-07:00
by SteveC
Ok, finally fixed. PHP just wanted the full path to convert.

Re: Ahhh! IM and Ghostscript no longer working together.

Posted: 2007-11-16T19:08:25-07:00
by wortell
do i need to have ghostscript 8.6 or other version installed to create a PDF file from imagemagick??? i'm using IM 6.3.6.

Thanks for any insight.

Re: Ahhh! IM and Ghostscript no longer working together.

Posted: 2007-11-16T21:02:00-07:00
by magick
Ghostscript is not required to create (write) a PDF, it is required to read a PDF.