One of the delights about using Linux is the command line interface (CLI), where the user issues program commands by typing in successive lines of text.
Even programs which rely on a graphical user interface (GUI) can be controlled from the command line, including the LibreOffice office suite.
One of the great features of LibreOffice is the integral PDF converter and this can even be controlled by command line using the command below without launching the program in a GUI.
$ libreoffice --headless --convert-to pdf name_of_file.odt
Just replace name_of_file.odt above with the actual file name you wish to convert, hit enter and the job’s done!