【问题标题】:Change "LiberationSerif" font when I convert XLSX to PDF via Libreoffice in CLI (soffice)在 CLI (soffice) 中通过 Libreoffice 将 XLSX 转换为 PDF 时更改“LiberationSerif”字体
【发布时间】:2017-01-30 11:12:26
【问题描述】:

问题:当我尝试将 xlsx 文档转换为 PDF 时,LibreOffice 会忽略我的字体。它为所有文本设置“LiberationSerif”。我尝试使用“Arial”、“Times New Roman”,但没有成功。

环境:从 LibreOffice 站点手动安装的 Debian 7x64、LibreOffice 5.2.3.3。 aptitude 中可用的版本已经过时了。

这是我尝试启动它的方式: sh /opt/libreoffice5.2/program/soffice --headless --infilter="Microsoft Excel 2007/2010 XML" --convert-to pdf:calc_pdf_Export --outdir /path-to-export-pdf /path-to-输入文件/file.xlsx

其他信息:直到我在用户的主目录中创建了空的“.openoffice.org”文件夹后,LibreOffice 才为我工作。在我在这里发布问题之前进行了研究。 LibreOffice API 中没有类似的设置。 这个答案真的很接近,但我不太擅长 C 学习 LibreOffice 的源代码 http://nabble.documentfoundation.org/Command-line-PDF-export-options-quot-soffice-convert-to-pdf-quot-td4158804.html

我发现@KurtPfeifle 的回答非常有帮助,但只要我是这里的新手,我就无法感谢他。 Command `libreoffice --headless --convert-to pdf test.docx --outdir /pdf` is not working

我希望 Kurt Pfeifle 会阅读这个问题,因为我确信他知道答案 :)

【问题讨论】:

    标签: excel pdf command-line fonts libreoffice


    【解决方案1】:

    我找到了解决方案。出于某种原因,我希望 Arai 和 Times New Roman 会出现在我们的服务器上。为了得到它们,我们必须从 debian 的 contrib 源安装 ttf-mscorefonts-installer。

    【讨论】:

      猜你喜欢
      • 2015-01-05
      • 2012-10-10
      • 2016-03-25
      • 1970-01-01
      • 2017-03-23
      • 2014-11-10
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多