Page 1 of 1

Export OpenOffice.org doc to PDF via CLI

PostPosted: Tue Aug 14, 2018 10:14 am
by viktor2k
How would I do this from the command line? Currently on 4.1.5

Re: Export OpenOffice.org doc to PDF via CLI

PostPosted: Tue Aug 14, 2018 12:54 pm
by Villeroy
Install LibreOffice instead of OpenOffice
Code: Select all   Expand viewCollapse view
$ 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
[...]