Ask Your Question

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

asked 2017-07-16 00:15:44 +0200

meika gravatar image

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

on Kubuntu 16.04.2 LTS Release: 16.04 Codename: xenial

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


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.

edit retag flag offensive close merge delete

2 Answers

Sort by » oldest newest most voted

answered 2017-07-16 04:43:15 +0200

librebel gravatar image

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

edit flag offensive delete link more


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

Ratslinger gravatar imageRatslinger ( 2017-07-16 06:42:27 +0200 )edit

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 !*

meika gravatar imagemeika ( 2017-07-16 10:27:52 +0200 )edit

answered 2017-07-16 00:53:56 +0200

Ratslinger gravatar image

updated 2017-07-16 00:54:49 +0200

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.

edit flag offensive delete link more


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

meika gravatar imagemeika ( 2017-07-16 10:29:05 +0200 )edit

soffice returned Error: source file could not be loaded

meika gravatar imagemeika ( 2017-07-16 10:33:47 +0200 )edit

@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 ✔ (upper left area of answer).

Ratslinger gravatar imageRatslinger ( 2017-07-16 15:31:36 +0200 )edit
Login/Signup to Answer

Question Tools

1 follower


Asked: 2017-07-16 00:15:44 +0200

Seen: 7,835 times

Last updated: Jul 16 '17