1

I would like to use the libreoffice flatpak version to headlessly convert odt files to pdf.

So e.g.

libreoffice --headless --convert-to pdf ./somefile.odt

However, I want to use the flatpak version for this.

Bruni
  • 10,542
  • Does your command distinguish between flatpak and other versions of LO? – graham Mar 24 '20 at 12:58
  • 1
    @Graham No, however, when involked on a system with libreoffice ppa installed, it uses this one. When involked on a system with only the flatpak version installed, it returns "libreoffice is not installed." – Bruni Mar 24 '20 at 13:09

1 Answers1

1

This:

flatpak run org.libreoffice.LibreOffice/x86_64/stable --headless --convert-to pdf ./somefile.odt

seems to work.

Hence, you can set an alias:

alias libreoffice="flatpak run org.libreoffice.LibreOffice/x86_64/stable"

and add it to your ~/.bashrc file and use libreoffice headlessly, like you are used to.

Bruni
  • 10,542