-1

我正在尝试使用 ghoshscript 转换图像中的 pdf。

PDF是: http: //www.coppernet.zm/MPLS.pdf

$ sudo docsplit images -o /tmp/previews -p 1-5 -s 150,750,1000 -f png MPLS.pdf 
While reading gs_cidfm.ps:
Error: /rangecheck in --.dicttomark--
Operand stack:
   (gs_cidfm.ps)   1   --nostringval--   1   Arial   --dict:4/4(G)--
Execution stack:
   %interp_exit   --nostringval--   --nostringval--   --nostringval--   %array_continue   --nostringval--   --nostringval--   --nostringval--   false   1   %stopped_push   --nostringval--   --nostringval--   --nostringval--
Dictionary stack:
   --dict:956/1123(G)--   --dict:0/20(G)--   --dict:64/200(L)--   --dict:956/1123(G)--       --dict:8/14(G)--   --dict:1/1(G)--
Current allocation mode is global
Current file position is 4622
Unrecoverable error: undefined in .uninstallpagedevice
Operand stack:
    gs_cidfm.ps  1  --nostringval--  1  Arial  --nostringval--
gm convert: "gs" "-q" "-dBATCH" "-dMaxBitmap=50000000" "-dNOPAUSE" "-sDEVICE=pnmraw" "- dTextAlphaBits=4" "-dGraphicsAlphaBits=4" "-r150x150" "-dFirstPage=1" "-dLastPage=1" " sOutputFile=/tmp/d20121211-1674-zs83qu/gme03xr0" "--" "/tmp/d20121211-1674-zs83qu/gmcjhLqq" "-c" "quit".
gm convert: Postscript delegate failed (MPLS.pdf).

我试着应用这个: http ://thomas-genin.com/ghostscript-convert-error-undefined-in-findresource/它会产生这个错误。

编辑:如果我删除/var/lib/ghostscript/fonts/cidfmap文件,我就没有错误了。

1 /Arial << /FileType /TrueType /Path (/usr/share/fonts/truetype/msttcorefonts/arial.ttf) /SubfontID 0 /CSI [(Artifex) (Unicode) 0] >> ;
4

1 回答 1

1

你没有说你使用的是什么版本的 Ghostscript,并且因为你使用的是执行 Ghostscript 的东西,所以你没有给我一个我可以实际尝试的命令行。

但是,假设错误中的 (ImageMagick?) 命令行是正在使用的命令行,我使用当前代码的副本将您的 PDF 文件渲染到 PNM 没有问题,所以我怀疑这个问题已经解决,我会推荐您升级到当前版本。

如果这不能解决问题,那么您应该在http://bugs.ghostscript.com打开一个错误报告,请在此处附上 PDF 文件,并提供一个演示问题的 Ghostscript 命令行。

于 2012-12-12T08:23:08.640 回答