

There's usually no difference between this and using the -convert-to-pdf option but it's easy to remember: $ libreoffice -print-to-file example.odt -headless Bonus: Flatpak and command options (More than once, I've issued this command and then run out of paper, so make sure you have enough paper loaded in your printer before you start.) To print all the files in a directory: $ libreoffice -p *.odt This option prints to the default printer without opening LibreOffice it just sends the document to your printer. You can print LibreOffice documents from the command line without opening the application: $ libreoffice -headless -p example.odt You can convert files to several formats, including PDF, HTML, DOC, DOCX, EPUB, plain text, and many more. Using wildcards means you can convert dozens of documents at once: $ libreoffice -headless -convert-to epub *.odt The solution is the -headless option, which executes LibreOffice processes without launching the graphical user interface.įor example, converting a document to EPUB is a pretty simple task in LibreOffice-but it's even easier with the libreoffice command: $ libreoffice -headless -convert-to epub example.odt When you need to do a small task like converting a file to a new format, it can take as long for the application to launch as it takes to do the task. Your document will open in LibreOffice and you can make changes to it, but you won't overwrite the original file when you save it. Have you ever created a document to use as a letterhead or invoice form? LibreOffice has a rich built-in template system, but you can make any document a template with the -n option: $ libreoffice -writer -n example.odt You can open files in read-only mode using -view to prevent accidentally making and saving changes to an important file: $ libreoffice -view example.odt 3.

You can even have it launch minimized in the background while you finish working in your current window: $ libreoffice -writer -minimized 2. You can start LibreOffice without the splash screen: $ libreoffice -writer -nologo Or if you need help with the spreadsheet application: $ libreoffice -helpcalc
