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

谢幕

相关推荐
万里沧海寄云帆10 小时前
Word 插入分节符页码更新问题
windows·microsoft·word
穆友航12 小时前
PDF内容提取,MinerU使用
数据分析·pdf
zls36536521 小时前
.NET高效下载word文件
开发语言·c#·word·.net
wqqqianqian21 小时前
国产linux系统(银河麒麟,统信uos)使用 PageOffice 动态生成word文件
word·动态·pageoffice·国产版
拾荒的小海螺1 天前
JAVA:探索 PDF 文字提取的技术指南
java·开发语言·pdf
村东头老张1 天前
Java 实现PDF添加水印
java·开发语言·pdf
好美啊啊啊啊!2 天前
Thymeleaf模板引擎生成的html字符串转换成pdf
pdf·html
zhentiya2 天前
曼昆《经济学原理》第八版课后答案及英文版PDF
大数据·pdf
三天不学习2 天前
如何解决pdf.js跨域从url动态加载pdf文档
javascript·pdf
吾店云建站2 天前
9个最佳WordPress PDF插件(查看器、嵌入和下载)
程序人生·pdf·创业创新·流量运营·程序员创富·教育电商