解决“Error: source file could not be loaded“,Ubuntu下使用LibreOffice

在Ubuntu系统中使用LibreOffice进行TXT到PDF转换时遇到错误:'Error:sourcefilecouldnotbeloaded'。问题源于未安装libreoffice-writer模块。解决方法是通过运行'udoapt-getinstalllibreoffice-writer'安装该模块,从而成功进行文件转换。
摘要由CSDN通过智能技术生成

#事故现场

在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

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值