首页 文章

在CLI中通过Libreoffice将XLSX转换为PDF时更改“LiberationSerif”字体(soffice)

提问于
浏览
-1

Problem :当我尝试将xlsx文档转换为PDF时,LibreOffice会忽略我的字体 . 它为所有文本设置"LiberationSerif" . 我试图使用"Arial","Times New Roman"但它没有用 .

Evironment :Debian 7x64,LibreOffice 5.2.3.3从LibreOffice站点手动安装 . aptitude中的availeble版已经过时了 .

This is how I try to launch it :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-input-file / file .XLSX

Additional information :LibreOffice没有't work for me until I created empty 977352 folder in my users'主目录 . 在我发布问题之前,我做过研究 . LibreOffice API中没有类似的设置 . 这个答案非常接近,但我不太擅长学习LibreOffice的源代码http://nabble.documentfoundation.org/Command-line-PDF-export-options-quot-soffice-convert-to-pdf-quot-td4158804.html

我这里是新手 . Command libreoffice --headless --convert-to pdf test.docx --outdir /pdf is not working

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

1 回答

  • 0

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

相关问题