#事故现场
在Ubuntu下使用LibreOffice,将txt转为pdf,命令如下:
libreoffice --invisible --convert-to pdf /home/parasaga/resource/testtxt.txt --outdir /home/parasaga/resource/
报错:
Error: source file could not be loaded
#原因及解决方法
1、原因:
安装LibreOffice的使用执行的如下命令:
sudo apt-get install libreoffice-common
这样安装的话,不会安装libreoffice-writer模块,导致上述报错;
2、解决方法:
安装libreoffice-writer模块。
sudo apt-get install libreoffice-writer