[问题] 如何在gshostscript中设置CJK Fonts

Web、Mail、Ftp、DNS、Proxy、VPN、Samba、LDAP 等基础网络服务
回复
banxitan
帖子: 1
注册时间: 2008-08-07 16:18

[问题] 如何在gshostscript中设置CJK Fonts

#1

帖子 banxitan » 2008-08-07 16:29

我安装的ubuntu 8.04 Server版本,因项目的需要,装了hylafax Server应用。

通过 hylaFax 发英文的PDF文件没有问题。但在实际的项目中,PDF是有中文字体的,

生成的PDF文档我是通过 itext 来实现的。。。。。

BaseFont bfChinese = BaseFont.createFont("STSong-Light","UniGB-UCS2-H", BaseFont.NOT_EMBEDDED);
Font FontChinese = new Font(bfChinese, 12, Font.NORMAL);

把生成的PDF文档发到hylaFax的服务端,不能正常发送出去,查看日志文件。有如下的错误
status:ERROR: /undefined in /UniGB-UCS2-H\
Operand stack:\
--dict:5/5(L)-- F1 12 --dict:5/5(L)-- --dict:5/5(L)-- STSong-Light-Un$
Execution stack:\
%interp_exit .runexec2 --nostringval-- --nostringval-- --nostringval-- $
Dictionary stack:\
--dict:1125/1686(ro)(G)-- --dict:0/20(G)-- --dict:107/200(L)-- --dict:107$
Current allocation mode is local\
Last OS error: 2\
ESP Ghostscript 815.03: Unrecoverable error, exit code 1\



在错误中,有提到GhostSccript的错误,我想到了它提供的PDF2PS工具
在命令行下 我输入 PDF2PS tt.pdf tt.ps 同样得到了如下的错误

ERROR: /undefined in /UniGB-UCS2-H
Operand stack:
--dict:5/5(L)-- F2 10 --dict:5/5(L)-- --dict:5/5(L)-- STSong-Light- UniGB-UCS2-H
Execution stack:
%interp_exit .runexec2 --nostringval-- --nostringval-- --nostringval- - 2 %stopped_push --nostringval-- --nostringval-- --nostringval-- fa lse 1 %stopped_push 1 3 %oparray_pop 1 3 %oparray_pop 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-- --nostringval-- --nostri ngval--
Dictionary stack:
--dict:1123/1686(ro)(G)-- --dict:0/20(G)-- --dict:107/200(L)-- --dict:1 07/200(L)-- --dict:104/127(ro)(G)-- --dict:241/347(ro)(G)-- --dict:20/24(L )-- --dict:4/6(L)-- --dict:24/31(L)--
Current allocation mode is local
Last OS error: 2
ESP Ghostscript 815.03: Unrecoverable error, exit code 1


二个错误一模一样,,

另外,我用Adobe Acrobat 7.0 Professional 把我用JAVA程序生成的tt.pdf文档手动转换成tt.ps文档,然后通过hylafax Clinet程序是能够正常把传真发送出去的。。。


我遇到的问题就是这样的,困扰了很长一段时间,不知道如何解决,希望高手帮帮忙,支支招,谢谢
回复