For a new web application that I am working on, I needed to convert a docx document to PDF.
Pandoc seems to be the most preferred option to do this.
Symlink pdflatex properly as mentioned here using the below line in the OSX terminal.
sudo ln -s /usr/texbin/pdflatex /usr/local/bin/
Check for the pdflatex version using:
Conversion: For conversion, lets use a sample markdown file as input to convert it
.docx and then we will convert from
# test document wget https://gist.githubusercontent.com/georgiana-gligor/fd247d02f8a44ce745db/raw/86e56346ba5593525da7bf1d69cc97f09e00b496/osx-pdf-from-markdown.markdown # create the docx file pandoc -o test.docx osx-pdf-from-markdown.markdown # create the pdf file pandoc -o test.pdf test.docx # of course you could do it directly too! More on why later! pandoc -o test2.pdf osx-pdf-from-markdown.markdown