Export OpenOffice.org doc to PDF via CLI

Issues installing under the Mac OSX - X11 - Aqua
Post Reply
viktor2k
Posts: 1
Joined: Tue Aug 14, 2018 10:04 am

Export OpenOffice.org doc to PDF via CLI

Post by viktor2k »

How would I do this from the command line? Currently on 4.1.5
OpenOffice 4.1.5 on Mac
User avatar
Villeroy
Volunteer
Posts: 31279
Joined: Mon Oct 08, 2007 1:35 am
Location: Germany

Re: Export OpenOffice.org doc to PDF via CLI

Post by Villeroy »

Install LibreOffice instead of OpenOffice

Code: Select all

$ libreoffice5.4 --help
[...]
--convert-to OutputFileExtension[:OutputFilterName] [--outdir output_dir]
                       Batch convert files (implies --headless). If --outdir
                       isn't specified, then current working directory is used
                       as output_dir. If --convert-to is used more than once,
                       last value of OutputFileExtension[:OutputFilterName] is
                       effective. If --outdir is used more than once, only its
                       last value is effective. For example:
                   --convert-to pdf *.doc
                   --convert-to pdf:writer_pdf_Export --outdir /home/user *.doc
                   --convert-to "html:XHTML Writer File:UTF8" *.doc
                   --convert-to "txt:Text (encoded):UTF8" *.doc
[...]
Please, edit this topic's initial post and add "[Solved]" to the subject line if your problem has been solved.
Ubuntu 18.04 with LibreOffice 6.0, latest OpenOffice and LibreOffice
Post Reply