Error: source file could not be loaded

I am trying to convert my docx files to pdf by using libreoffice from terminal.
I am trying it with these code:

>    libreoffice --headless --convert-to pdf *docx

However it gives that:
Error: source file could not be loaded

Why is that happening? I have tried to make it with libreoffice4.3 as I have seen in the forum but it did not worked.
How can I do that?

What is --headset?

sorry. I meant headless. I have written wrong here.

Make sure that the you have installed libreoffice-writer package. Installing libreoffice-common and its buddies does not install Writer, so there’s no LibreOffice component which knows how to handle docx files. Just lost an hour and a half to this.

tl;dr: sudo apt install libreoffice-writer

1 Like

Thank you dude! You saved my time, I’ve also spent an hour searching the answer for that problem