Skip to content

Instantly share code, notes, and snippets.

@Warrelis
Warrelis / docx2pdf
Created May 23, 2019 04:32 — forked from diogo-almeida/docx2pdf
Batch .docx conversion to .pdf using LibreOffice from the command line
# Path of LibreOffice installation
cd /Applications/LibreOffice.app/Contents/MacOS
# General command
./soffice --headless --convert-to <extension> <path+file>
# Automatically convert all .odt files to pdf
./soffice --headless --convert-to pdf ~/Downloads/*.odt
# To specify an output folder you can add the --outdir option