linux - unoconv : UnoException during import phase: The document '(path to document)' could not be opened

标签 linux openoffice.org soffice

我有一个非常奇怪的错误。我在我的 CentOS 服务器上运行 open office,我正在尝试将用户上传的文档转换为 html。通常,该过程适用于较小的文档。但是,一旦文档大小超过 1.5MB,我们的文件就无法通过开放式办公室 headless 转换过程。

我们试过用

$ /usr/bin/libreoffice --headless --convert-to html example.doc -outdir ../

$ unoconv -f html -o /var/www/vhosts/shmim.shmimshmam.com/tmp/convertdocs/example.html bible.doc

第一个在我们的服务器上创建一个流氓进程,它占用系统资源,直到我们手动杀死它。

第二个在我们的错误日志中抛出一个错误,并且永远不会进入转换过程。该错误是我在标题中发布的错误,但又出现了,这次没有删除文件路径。

unoconv: UnoException during import phase: The document 'file:///var/www/vhosts/shmim.shmimshmam.com/tmp/convertdocs/08336587c498af3d3292654657061828.doc' could not be opened.

当我尝试打开已上传到我们服务器的文件(通过 html 表单)时,它似乎已损坏。这对我来说很奇怪,因为上传过程非常简单,而且上传的文件完全没有被篡改。以二进制形式观察这两个文件,它们的构成似乎没有任何差异。但是,当我将原始文件和上传的文件都转换为 md5 哈希进行比较时,它们是不同的。

这一切让我感到非常困惑,我现在正处于想要烧掉我的内衣并停止使用除臭剂并调用我妈妈并告诉她她是一个 hussie 的时刻。请帮助阻止我破坏我的个人生活!

最佳答案

阅读自述文件的故障排除部分:https://github.com/dagwieers/unoconv#troubleshooting-instructions

这有多种可能的原因,最重要的是它是 LibreOffice 中的错误。您可以通过以下网址报告来提供帮助:https://bugs.freedesktop.org/enter_bug.cgi?product=LibreOffice&bug_status=UNCONFIRMED

关于linux - unoconv : UnoException during import phase: The document '(path to document)' could not be opened,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/17540818/

相关文章:

Linux 外壳 : Adding dots to numerical outputs to make them more readable

c - 命令行参数位于何处?

java - 使用 OpenOffice API 抓取整个文档树

linux - 网络流量的软件中断

linux - shell合并两个文件

excel - 如何将 Excel/OpenOffice/LibreOffice 图表导出为 SVG?

java - OOoBeans 死了吗? - 我有什么选择?

php - soffice 命令不在 php shell_exec() 中执行

python - 无法读取使用 soffice 命令转换 pdf 后获得的 .docx 文件

ubuntu - 尝试将 LibreOffice (soffice) 作为 systemctl 服务运行失败