"Error: source file could not be loaded" from libreoffice --headless --convert-to pdf some.odt

It worked about a month ago, stopped after I moved to
Libreoffice Version: 5.3.3.2
Build ID: 3d9a8b4b4e538a85e0782bd6c2d430bafe583448

on Kubuntu
16.04.2 LTS Release: 16.04
Codename: xenial

$ libreoffice --headless --convert-to pdf some.odt

returns

Error: source file could not be loaded

And no, Libreoffice is not running. Doesn’t matter what file type source or output are, or putting in the whole pathway.

Hello @meika,

Please try if it works when you first use the terminal to navigate to the folder containing your file some.odt, and then run the command again.

You can navigate using the cd command, e.g. $ cd Desktop

You can see the contents of the current folder by typing: dir

@librebel I believe you are right. Just re-tested when I saw your answer & libreoffice also works. Must be file location problem. +1

Running in Dolphin’s terminal is as above.

In Konsole, cd my way to the directory, then with
*$ libreoffice --headless --convert-to odt .docx

returns a number of these
error
xsltParseStylesheetFile : cannot parse
I/O warning : failed to load external entity “”

and then for each file, I assume matching *.docx
Error: source file could not be loaded

*BUT using libreoffice5.3 --headless --convert-to odt .docx
worked !

Your previous version was probably less than 5.x. Instead of libreoffice a more consistent approach would be to use soffice. However libreoffice5.3 will also work. As versions change, so will this. Better off with soffice.

using libreoffice5.3 --headless --convert-to odt *.docx worked !

soffice returned Error: source file could not be loaded

@meika Please be aware in future releases you may need to revise the name based upon the version.

If this answers your question please click on the :heavy_check_mark: (upper left area of answer).