2023年8月3日发(作者:)
Linux下openoffice转换word文档到pdf文档时中文乱码问题
报错显示:
INFO: connected
Jun 1, 2009 11:21:52 AM
ctOpenOfficeConnection disposing
INFO: disconnected
Exception in thread "main"
ficeException: conversion failed: could not load input document
at
dExport(:131)
at
tInternal(:120)
at
t(:104)
at
t(:74)
at
t(:70)
at
tOne(:154)
at
(:139)
问题解决:
此时可能是linux下的jre没有相应的中文字体的问题
下载 黑体
宋体
两种字体文件 找到jre的字体路径:/usr/jdk1.6.0_22/jre/lib/fonts
新建文件夹fallback:mkdir fallback
将字体 、拷贝到/usr/jdk1.6.0_22/jre/lib/fonts/fallback目录下
重启openoffice
ps ax|grep soffice
显示如下:
22739 pts/5 S 0:00 /bin/sh
/opt/3/program/soffice -headless
-accept=socket,host=127.0.0.1,port=8100;urp; -nofirststartwizard
22747 pts/5 Sl 0:01
/opt/3/program/ -headless
-accept=socket,host=127.0.0.1,port=8100;urp; -nofirststartwizard
23789 pts/5 S+ 0:00 grep soffice
关闭soffice进程:kill 22739
以后台启动openoffice:
/opt/3/program/soffice -headless
-accept=socket,host=127.0.0.1,port=8100;urp; -nofirststartwizard &
问题解决了!!
但是,这种情况下只能解决,宋体和黑体的乱码问题,其他字体的还需添加字体文件来解决
2023年8月3日发(作者:)
Linux下openoffice转换word文档到pdf文档时中文乱码问题
报错显示:
INFO: connected
Jun 1, 2009 11:21:52 AM
ctOpenOfficeConnection disposing
INFO: disconnected
Exception in thread "main"
ficeException: conversion failed: could not load input document
at
dExport(:131)
at
tInternal(:120)
at
t(:104)
at
t(:74)
at
t(:70)
at
tOne(:154)
at
(:139)
问题解决:
此时可能是linux下的jre没有相应的中文字体的问题
下载 黑体
宋体
两种字体文件 找到jre的字体路径:/usr/jdk1.6.0_22/jre/lib/fonts
新建文件夹fallback:mkdir fallback
将字体 、拷贝到/usr/jdk1.6.0_22/jre/lib/fonts/fallback目录下
重启openoffice
ps ax|grep soffice
显示如下:
22739 pts/5 S 0:00 /bin/sh
/opt/3/program/soffice -headless
-accept=socket,host=127.0.0.1,port=8100;urp; -nofirststartwizard
22747 pts/5 Sl 0:01
/opt/3/program/ -headless
-accept=socket,host=127.0.0.1,port=8100;urp; -nofirststartwizard
23789 pts/5 S+ 0:00 grep soffice
关闭soffice进程:kill 22739
以后台启动openoffice:
/opt/3/program/soffice -headless
-accept=socket,host=127.0.0.1,port=8100;urp; -nofirststartwizard &
问题解决了!!
但是,这种情况下只能解决,宋体和黑体的乱码问题,其他字体的还需添加字体文件来解决
发布评论