2014-02-17 83 views
0

我在將某些PDF轉換爲'jpg'時遇到問題;只有當我執行代碼exec()時,它纔會發生。我使用PHP,但是當我直接在服務器上執行相同的代碼時,它的效果很好。ImageMagick對某些PDF有問題

這是拋出我的錯誤:

[0] => Error: /invalidaccess in --.execform1--

[1] => Operand stack:

[2] => --dict:8/17(L)-- 1 10 4 15 6 18 C2_2 10 --dict:6/6(L)-- --dict:6/6(L)-- FrutigerLTStd-Roman --dict:11/12(ro)(G)-- --nostringval-- CIDFontObject --dict:7/7(L)-- --dict:7/7(L)-- 725745 --dict:7/7(L)-- --nostringval-- PDFCIDFontName FrutigerLTStd-Roman

[3] => Execution stack:

[4] => %interp_exit .runexec2 --nostringval-- --nostringval-- --nostringval-- 2 %stopped_push --nostringval-- --nostringval-- --nostringval-- false 1 %stopped_push 1846 1 3 %oparray_pop 1845 1 3 %oparray_pop 1829 1 3 %oparray_pop --nostringval-- --nostringval-- 2 1 1 --nostringval-- %for_pos_int_continue --nostringval-- --nostringval-- --nostringval-- --nostringval-- %array_continue --nostringval-- false 1 %stopped_push --nostringval-- %loop_continue --nostringval-- 9656 --nostringval-- 1794 4 11 %oparray_pop --nostringval-- false 1 %stopped_push 1793 4 11 %oparray_pop --nostringval-- (gstatetype) --dict:0/0(L)-- --nostringval-- false 1 %stopped_push --nostringval-- %loop_continue --nostringval-- 726421 --nostringval-- 1794 6 16 %oparray_pop --nostringval-- false 1 %stopped_push 1793 6 16 %oparray_pop --nostringval-- (gstatetype) --dict:4/4(L)-- --nostringval-- false 1 %stopped_push --nostringval-- %loop_continue --nostringval-- 725947 --nostringval-- 1794 8 19 %oparray_pop --nostringval-- false 1 %stopped_push 1793 8 19 %oparray_pop --nostringval-- (gstatetype) --dict:1/1(L)-- --nostringval-- false 1 %stopped_push --nostringval-- %loop_continue --nostringval-- --nostringval-- --nostringval-- --nostringval-- --nostringval-- --nostringval-- %array_continue --nostringval-- --nostringval-- --nostringval-- --nostringval-- --nostringval--

[5] => Dictionary stack:

[6] => --dict:1154/1684(ro)(G)-- --dict:1/20(G)-- --dict:75/200(L)-- --dict:75/200(L)-- --dict:106/127(ro)(G)-- --dict:286/300(ro)(G)-- --dict:22/25(L)-- --dict:4/6(L)-- --dict:22/40(L)-- --dict:1/1(ro)(G)-- --dict:2/5(L)-- --dict:1/1(ro)(G)-- --dict:1/1(ro)(G)-- --dict:1/1(ro)(G)-- --dict:1/1(ro)(G)-- --dict:2/5(L)-- --dict:1/1(ro)(G)-- --dict:1/1(ro)(G)-- --dict:2/5(L)-- --dict:1/1(ro)(G)-- --dict:9/15(L)-- --dict:1/1(ro)(G)-- --dict:1/1(ro)(G)--

[7] => Current allocation mode is local

有沒有人有處理這個問題呢?

回答

0

的錯誤是從Ghostscript的,什麼版本的GS的你已經安裝了?

注意invalidaccess可能是由於文件的權限,從您的堆棧跟蹤它試圖執行的CIDFont因此可能存在權限問題與字體目錄。它只有一個理論,但它只有在PHP下運行時纔會失敗。您可能需要查看PHP'用戶'的環境和權限

+0

使用GS的最後一個版本。 奇怪的是,當我打開pdf並以不同的名稱保存它,它的工作原理...也許是關於權限。 – robzdc

+0

更具體請。最後的版本可能意味着什麼取決於您正在使用的操作系統。您是否檢查過用戶的環境,組和權限? – KenS

+0

Ghostscript 9.10 – robzdc