2014-02-17 35 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