armbian 安装libreoffice 转换word为PDF

  1. 安装libreoffice
bash 复制代码
sudo apt-get install libreoffice
  1. 安装JVM
bash 复制代码
sudo apt-get install default-jre
#验证
java -version
  1. 尝试转换:
bash 复制代码
libreoffice --convert-to pdf /root/printFiles/f.docx
  1. 发现问题乱码
  2. 从Windows 拷贝字体到debian上,windows字体路径是:C:\Windows\Fonts,我这里随便选了几个字体
  3. 然后拷贝到armbian的这个目录下 /usr/share/fonts
  4. 先执行命令查看现有字体
bash 复制代码
fc-list
#以下到结束是输出
root@aml-s812:~# fc-list 
/usr/share/fonts/truetype/ttf-bitstream-vera/VeraMoBI.ttf: Bitstream Vera Sans Mono:style=Bold Oblique
/usr/share/fonts/truetype/ttf-bitstream-vera/VeraBI.ttf: Bitstream Vera Sans:style=Bold Oblique
/usr/share/fonts/truetype/ttf-bitstream-vera/VeraBd.ttf: Bitstream Vera Sans:style=Bold
/usr/share/fonts/truetype/ttf-bitstream-vera/VeraSe.ttf: Bitstream Vera Serif:style=Roman
/usr/share/fonts/truetype/ttf-bitstream-vera/VeraMoBd.ttf: Bitstream Vera Sans Mono:style=Bold
/usr/share/fonts/truetype/ttf-bitstream-vera/VeraSeBd.ttf: Bitstream Vera Serif:style=Bold
/usr/share/fonts/truetype/ttf-bitstream-vera/Vera.ttf: Bitstream Vera Sans:style=Roman
/usr/share/fonts/truetype/ttf-bitstream-vera/VeraMono.ttf: Bitstream Vera Sans Mono:style=Roman
/usr/share/fonts/truetype/ttf-bitstream-vera/VeraIt.ttf: Bitstream Vera Sans:style=Oblique
/usr/share/fonts/truetype/ttf-bitstream-vera/VeraMoIt.ttf: Bitstream Vera Sans Mono:style=Oblique
/usr/share/fonts/truetype/openoffice/opens___.ttf: OpenSymbol:style=Regular
  1. 执行命令加载字体
bash 复制代码
fc-cache
  1. 在执行查看现有字体命令
bash 复制代码
fc-list
#以下到结束是输出
/usr/share/fonts/truetype/ttf-bitstream-vera/VeraMoBI.ttf: Bitstream Vera Sans Mono:style=Bold Oblique
/usr/share/fonts/MINGLIUB.TTC: MingLiU_HKSCS\-ExtB,?明?_HKSCS\-ExtB:style=Regular
/usr/share/fonts/truetype/ttf-bitstream-vera/VeraBI.ttf: Bitstream Vera Sans:style=Bold Oblique
/usr/share/fonts/truetype/ttf-bitstream-vera/VeraBd.ttf: Bitstream Vera Sans:style=Bold
/usr/share/fonts/truetype/ttf-bitstream-vera/VeraSe.ttf: Bitstream Vera Serif:style=Roman
/usr/share/fonts/truetype/ttf-bitstream-vera/VeraMoBd.ttf: Bitstream Vera Sans Mono:style=Bold
/usr/share/fonts/MINGLIUB.TTC: PMingLiU\-ExtB,新?明?\-ExtB:style=Regular
/usr/share/fonts/truetype/ttf-bitstream-vera/VeraSeBd.ttf: Bitstream Vera Serif:style=Bold
/usr/share/fonts/MINGLIUB.TTC: MingLiU\-ExtB,?明?\-ExtB:style=Regular
/usr/share/fonts/truetype/ttf-bitstream-vera/Vera.ttf: Bitstream Vera Sans:style=Roman
/usr/share/fonts/MSYH.TTC: Microsoft YaHei UI:style=Regular,Normal,oby?ejné,Standard,Κανονικ?,Normaali,Normál,Normale,Standaard,Normalny,Обычный,Normálne,Navadno,Arrunta
/usr/share/fonts/MSYHL.TTC: Microsoft YaHei,微软雅黑,Microsoft YaHei Light,微软雅黑 Light:style=Light,Regular
/usr/share/fonts/MSYH.TTC: Microsoft YaHei,微软雅黑:style=Regular,Normal,oby?ejné,Standard,Κανονικ?,Normaali,Normál,Normale,Standaard,Normalny,Обычный,Normálne,Navadno,Arrunta
/usr/share/fonts/STFANGSO.TTF: STFangsong,华文仿宋:style=Regular
/usr/share/fonts/STCAIYUN.TTF: STCaiyun,华文彩云:style=Regular
/usr/share/fonts/MSYHBD.TTC: Microsoft YaHei UI:style=Bold,Negreta,tu?né,fed,Fett,?ντονα,Negrita,Lihavoitu,Gras,Félk?vér,Grassetto,Vet,Halvfet,Pogrubiony,Negrito,Полужирный,Fet,Kal?n,Krepko,Lodia
/usr/share/fonts/truetype/ttf-bitstream-vera/VeraMono.ttf: Bitstream Vera Sans Mono:style=Roman
/usr/share/fonts/truetype/ttf-bitstream-vera/VeraIt.ttf: Bitstream Vera Sans:style=Oblique
/usr/share/fonts/truetype/ttf-bitstream-vera/VeraMoIt.ttf: Bitstream Vera Sans Mono:style=Oblique
/usr/share/fonts/MSYHBD.TTC: Microsoft YaHei,微软雅黑:style=Bold,Negreta,tu?né,fed,Fett,?ντονα,Negrita,Lihavoitu,Gras,Félk?vér,Grassetto,Vet,Halvfet,Pogrubiony,Negrito,Полужирный,Fet,Kal?n,Krepko,Lodia
/usr/share/fonts/truetype/openoffice/opens___.ttf: OpenSymbol:style=Regular
/usr/share/fonts/MSYHL.TTC: Microsoft YaHei UI,Microsoft YaHei UI Light:style=Light,Regular
/usr/share/fonts/SIMFANG.TTF: FangSong,仿宋:style=Regular,Normal,oby?ejné,Standard,Κανονικ?,Normaali,Normál,Normale,Standaard,Normalny,Обычный,Normálne,Navadno,Arrunta

谢幕

相关推荐
hairenjing11234 小时前
使用 Mac 数据恢复从 iPhoto 图库中恢复照片
windows·stm32·嵌入式硬件·macos·word
S. Dylan8 小时前
Edge浏览器打开PDF无法显示电子签章
edge·pdf
一马平川的大草原8 小时前
如何基于pdf2image实现pdf批量转换为图片
计算机视觉·pdf·文件拆分
m0_594526308 小时前
Python批量合并多个PDF
java·python·pdf
hairenjing11238 小时前
将图片添加到 PDF 的 5 种方法
pdf
✿゚卡笨卡8 小时前
pdf 添加页眉页脚,获取前五页
java·pdf
blegn8 小时前
PDF编辑工具Adobe Acrobat DC 2023安装教程(附安装包)
pdf·办公软件·office
patrickpdx10 小时前
如何调整pdf的页面尺寸
pdf
星月前端13 小时前
【vue-pdf】简单封装pdf预览组件
javascript·vue.js·pdf
初九之潜龙勿用17 小时前
C#结合JS解决Word添加无效位图导致进程停滞的问题
javascript·ui·c#·word·asp.net