$ sudo apt-get install libreoffice
$ libreoffice --headless --invisible --convert-to pdf test.docx ./