—
參考
- How to make libreoffice headless to work on CentOS 6.3
- How can I convert an ODT file to a PDF?
- 關於libreoffice在centos7上轉pdf遇到中文亂碼的問題
—
安裝、中文化設定
1 2 |
# yum install libreoffice-headless # yum groupinstall "fonts" |
檢查語系設定
1 |
vi /etc/locale.conf |
1 |
LANG="zh_TW.UTF-8" |
套用
1 |
# source /etc/locale.conf |
—
轉換
首先依據來源文件安裝對應程式,例如試算表 calc
1 2 |
# yum install libreoffice-calc # libreoffice --headless --convert-to pdf a.xls |
—
從網頁執行
除了需要設定一個網頁 apache 可以寫入的目錄外,還要注意 SELinux 是否已經關閉
—
Windows CLI
1 |
"C:\Program Files\LibreOffice\program\soffice.exe" --convert-to pdf test.xls |
—
265 total views, no views today