Libreoffice转换为无法正常工作 [英] Libreoffice convert-to not working

查看:658
本文介绍了Libreoffice转换为无法正常工作的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试将文档从html,txt转换为pdf,odt,反之亦然..但是似乎只有odt转换为pdf..没有其他文件格式可以转换

I'm trying to convert documents from html,txt to pdf,odt and vice versa.. But only odt to pdf seems to work.. No other file formats are converted

这是我的命令

libreoffice --headless --convert-to pdf test.html [Not working]
libreoffice --headless --convert-to odt test.html [Not working]
libreoffice --headless --convert-to pdf test.docx [Not working]
libreoffice --headless --convert-to pdf test.odt  [Working]

推荐答案

这是一个已知的LibreOffice中的问题已在5.3.0版中修复.在此修复程序之前,如果LibreOffice实例正在运行--convert-to或任何其他命令将不执行任何操作而静默终止.

This is a known issue in LibreOffice that was fixed in version 5.3.0. Before this fix when an instance of LibreOffice is running --convert-to or any other command would silently terminate without doing anything.

如果您的版本早于该版本,则可以在此处考虑 Frank Yin建议的解决方案.那就是在运行转换之前,关闭所有打开的LibreOffice文档.

If your version is older than that you could consider the solution suggested by Frank Yin here. That is close all open LibreOffice documents before running the conversion.

如果您无法关闭所有打开的LibreOffice文档来运行转换,或者发现不方便,则可以尝试

If you cannot close all open LibreOffice documents to run the conversion, or if you find it inconvenient, you could try a solution suggested in the comments to the original bug.

如果您的LibreOffice版本是 4.5之前的版本,请运行

If you have LibreOffice version before 4.5 run

soffice -env:UserInstallation=file:///$HOME/.libreoffice-headless/ \
--headless --convert-to pdf test.docx

如果您运行的LibreOffice版本在4.5和5.3之间,请运行

If you are running LibreOffice version between 4.5 and 5.3 run

soffice -env:UserInstallation=file:///$HOME/.libreoffice-headless/ \
--convert-to pdf test.docx

此处$HOME/.libreoffice-headless是一个新的配置文件目录,与您的主要LibreOffice配置文件不同.

Here $HOME/.libreoffice-headless is a new profile directory different from your main LibreOffice profile.

这篇关于Libreoffice转换为无法正常工作的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆