2012-12-11 43 views
-1

我正在嘗試使用ghoshscript來轉換PDF中的圖像。Ghoshscript錯誤:錯誤:/ rangecheck in - 。dicttomark -

的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). 

我tryied應用此: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] >> ; 

回答

1

你不說你使用的是什麼版本的Ghostscript的,因爲你正在使用的東西,其執行的Ghostscript你沒有給我一個命令行其實我可以試試。

但是,假設錯誤中的(ImageMagick?)命令行是正在使用的命令行,我使用當前代碼的副本將您的PDF文件呈現爲PNM,因此我懷疑這已解決,我會建議你升級到當前版本。

如果這不能解決問題,那麼你應該在http://bugs.ghostscript.com上打開一個錯誤報告,請在那裏附上PDF文件,並提供一個Ghostscript命令行來演示這個問題。

+0

這是8.71版本。 pdf沒有使用arial cidfmap,但是失敗了。 – Natim

+0

8.71比較舊,大概2.5歲,我建議你升級到9.06的當前版本。如果問題仍然存在,請打開一個錯誤報告。對於我來說,在當前版本的源代碼作品上使用你的命令行。 – KenS