Page 1 of 1

Problem with convert eps3 and latex command

Posted: 2011-12-21T08:19:33-07:00
by thomkris
I am using ImageMagick 6.7.2-7 2011-10-19 presently. (One of old version worked with eps3 earlier, but not now)

I am trying to either convert or combine 4 png files to one eps file. I have to compress the final eps format file. I then use the eps file in LaTEx to build pdf. I get following error when reading with Latex. I can open in ghost view fine. I am not sure if the filepp.eps file is corrupted or I am not using correct options. This flow works fine with no eps3. Thanks for your suggestion.

Command: convert -page A4 filepp.gif -compress zip eps3:filepp.eps

Error: /undefined in ÃK
Operand stack:

Execution stack:
%interp_exit .runexec2 --nostringval-- --nostringval-- --nostringval-- 2 %s
topped_push --nostringval-- --nostringval-- --nostringval-- false 1 %stopped_p
ush 1 3 %oparray_pop 1 3 %oparray_pop 1 3 %oparray_pop 1 3 %oparra
y_pop .runexec2 --nostringval-- --nostringval-- --nostringval-- 2 %stopped_pus
h --nostringval-- --nostringval-- --nostringval--
Dictionary stack:
--dict:1046/1123(ro)(G)-- --dict:0/20(G)-- --dict:90/200(L)-- --dict:195/300(L)--
--dict:64/200(L)-- --dict:90/200(L)--
Current allocation mode is local
Last OS error: 2
Current file position is 60650

Re: Problem with convert eps3 and latex command

Posted: 2011-12-21T10:23:34-07:00
by magick
ImageMagick depends on Ghostscript to render Postscript / PDF files. You may need to upgrade your release of Ghostscript. Its currently @ 9.04. You might consider upgrading ImageMagick as well. Its currently @ ImageMagick 6.7.4-0.

Re: Problem with convert eps3 and latex command

Posted: 2011-12-22T12:03:11-07:00
by thomkris
thanks for the suggestion. I will give it a try and let you know outcome.

Re: Problem with convert eps3 and latex command

Posted: 2012-03-14T07:26:28-07:00
by thomkris
magik,

I tried with latest ghostscript 9.04 and using convert version of 6.7.2-7. The problem still persists and across aix and linux. I believe its a bug with both eps2 and ep3.

Can someone try a small example at your side.

Re: Problem with convert eps3 and latex command

Posted: 2012-03-14T08:35:12-07:00
by magick
We're using Ghostscript 9.04 and ImageMagick 6.7.6-0:
  • -> convert -page A4 filepp.gif -compress zip eps3:filepp.eps

    -> gs filepp.eps
    GPL Ghostscript 9.04 (2011-08-05)
    Copyright (C) 2011 Artifex Software, Inc. All rights reserved.
    This software comes with NO WARRANTY: see the file PUBLIC for details.
    >>showpage, press <return> to continue<<
The Postscript rendering matches that of the original image and no exceptions are generated.

Post a URL to your original image and the converted EPS. We'll compare it to what we generate and see if can identify some difference that is causing the exception.

Re: Problem with convert eps3 and latex command

Posted: 2012-03-14T10:26:24-07:00
by magick
Ghostscript seems to complain when the EPS includes a HiResBoundingBox statement. Remove it and all is fine. You can also use the ps2eps program to generate a bounding box that stops the complaints. Recall you're trying to display an EPS on a Postscript canvas so the bounding box may need adjusting. Note, if the input image is less than the Postscript canvas size (typically 612x792), no bounding box complaints are issued (e.g. convert rose: eps3:rose.eps).

Re: Problem with convert eps3 and latex command

Posted: 2012-03-19T10:37:43-07:00
by thomkris
Admin,

I have tried removing HiResBoundingBox (hand removal) and the resulting file didn't help. I have uploaded the set of files at the link below. Let me know your suggestions.

http://www.mediafire.com/?hdfjkd302ht67ar

The eps files are created using eps3 compression. Try opening them in ghostscript. The ps2pdf output yield nothing due to the ghostscript problem.

Re: Problem with convert eps3 and latex command

Posted: 2012-03-26T09:41:42-07:00
by thomkris
Admin, Is there an update on this problem? Do you want me to try anything at my side?