Is there any command line tool to convert DOC and DOCX files to PDF? If no, can it be automated by some Automator script (open-print to PDF-close)?
Command line tool to convert DOC and DOCX files to PDF
file conversionms officesoftware-recommendation
Related Question
- Free command line program for converting PDF files to SVG
- MacOS – Blank page removal tool for PDF
- Using Hazel or AppleScript to Convert Word to PDF
- Using AppleScript to batch convert .pages to pdf
- Using Homebrew to convert TIFF to PDF
- Command Line Tool to Batch Convert .EML/.EMLX/.MBOX to Searchable PDFs
Best Answer
If you have Office:Mac 2008 Business Edition or Office:Mac 2011 Home/Business Edition, Automator actions are included with those editions. One of the Automator actions included with those versions of Office:Mac is "Convert Format of Word Documents", and one of the options in that Automator action is PDF. This page has great information about Automator and Office:Mac.
If you have Home/Student Edition instead of Business Edition, or don't have Office at all, you can accomplish it via AppleScript. Mac OS X Hints has an article about bulk converting text files to PDF via AppleScript, and the comments to that article give some options to convert DOC/DOCX to PDF via RTF. That might result in a loss of formatting or linking if you've got very complex DOC/DOCX files, but might be sufficient for files that aren't terribly complex.