I was sent a whole load of .docx files.
Not a problem, because LibreOffice opens them.
But I want them as .pdf files, so I can scribble on them as I read them, using Xournal++.
How to convert a whole folder full of .docx files to .pdf easily?
libreoffice --headless --convert-to pdf *.docx
Since this is case-sensitive, if you've got files with a shouty .DOCX extension, you'll need to vary this, or just run it again with the different extension.
But I got an error message:
javaldx: Could not find a Java Runtime Environment! Please ensure that a JVM and the package libreoffice-java-common is installed. If it is already installed then try removing ~/.config/libreoffice/4/user/config/javasettings_Linux_*.xml Warning: failed to read path from javaldx
First things first, I installed
So I tried deleting
What fixed it for me was installing
libreoffice-base, which I had thought was already there, but was not:
sudo apt install libreoffice-base -y
After that, it works: a very quick way of converting a lot of .docx/.DOCX files to .pdf.