开发者

"Error: /ioerror in --filter--" in converting PDF to print supported format with Ghostscript

开发者 https://www.devze.com 2023-02-08 10:37 出处:网络
I am gonna convert PDF files with Ghostscript in HP-UX system so I can print those files in LX and LQ printers. For LX printers --for example, I use this command:

I am gonna convert PDF files with Ghostscript in HP-UX system so I can print those files in LX and LQ printers. For LX printers --for example, I use this command:

gs -q -dBATCH -dSAFER -r120x216 -dNOPAUSE -sDEVICE=eps9high -sPAPERSIZE=letter -sOutputFile=TEST.TEMP.pdf.LXPRINT TEST.pdf

Every PDF files work just fine. But everytime I convert PDF files that contain images, it gives me error as follow:

Error: /ioerror in --filter--
Operand stack:
   --dict:6/15(L)--   false   --dict:9/17(L)--   --nostringval--   --nostringval--
Execution stack:
   %interp_exit   .runexec2   --nostringval--   --nostringval--   --nostringval--   2   %stopped_push   --nostringval--   --nostringval--   --nostringval--   false   1   %stopped_push   1878   1   3   %oparray_pop   1877   1   3   %oparray_pop   1861   1   3   %oparray_pop   --nostringval--   --nostringval--   2   1   2   --nostringval--   %for_pos_int_continue   --nostringval--   --nostringval--   --nostringval--   --nostringval--   %array_continue   --nostringval--   false   1   %stopped_push   --nostringval--   %loop_continue   --nostringval--   3187   --nostringval--   --nostringval--   --nostringval--   --nostringval--   --nostringval--   --nostringval--   %a开发者_运维知识库rray_continue   1749   6   13   %oparray_pop
Dictionary stack:
   --dict:1151/1684(ro)(G)--   --dict:1/20(G)--   --dict:75/200(L)--   --dict:75/200(L)--   --dict:108/127(ro)(G)--   --dict:288/300(ro)(G)--   --dict:22/25(L)--   --dict:6/8(L)--   --dict:21/40(L)--   --dict:1/1(ro)(G)--   --dict:1/1(ro)(G)--   --dict:1/1(ro)(G)--   --dict:7/15(L)--
Current allocation mode is local
Last OS error: 2
GNU Ghostscript 0.08.71: Unrecoverable error, exit code 1

As you can see, I used Ghostscript 8.71.1 and my system is HP-UX Itanium v11.23.

I have been installed all the dependencies --jpeg, libXrender and everything-- but nothing changed.


Where did you get the binaries from? Maybe the packager didn't enable image rendering (or manually disabled it), and maybe he compiled a statically linked binary?

Is it possible for you to compile it yourself from the sources?

If you compile yourself, you may need to edit some of the makefiles in order to enable image rendering. Watch out for thes *.dev keywords in the makefiles. Some ar commented out by default.

Edit: Are your PDFs in any way special? Did you cross-test if Ghostscript 8.71 on a different OS platform (say, Linux or Windows) can handle your PDFs?


On the off chance you are still having issues. I had exactly the same issue, eventually tracked it down to a very small /tmp mount

testing with

mount -o bind /path/to/space/ /tmp

led to the above issue going away, and after playing a bit further found that

export TMPDIR="/path/to/space/";

also worked

I'm working with Debian Lenny, and ImageMagick 6.3.7 I also considered

How do I change temp path of imagemagick?

but it didn't work for me, and I didn't want to recompile.


In my case, it was an issue with tmp folder and the file that imagemagic creates there. imagic-{some hash characters} i add the " -limit memory 512" to limit the memory consumption and deleted the temporary file. That fixed the issue.

0

精彩评论

暂无评论...
验证码 换一张
取 消