【发布时间】: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