Is there a CLI-only package to convert MS Office files to PDF? [closed]

Is there a command-line interface only package to convert Microsoft Office files to PDF? Specifically, I need to be able to export

  • doc/docx (Word),
  • ppt/pptx (PowerPoint),
  • xls/xlsx (Excel), and
  • vsd/vsdx (Visio).

I am aware that an installation of LibreOffice comes with a CLI to convert documents, but it does not appear to support Visio diagrams. Is there a package that does?


Ideally I'd like a solution that works on Linux, but I could find a way to use Windows if it would be far more practical. What I will very likely not have is a license to any MS products.


You can use powershell. You can write your own, but often MS already has such scripts written for you, because all recent office supports powershell and thus can be operated on by powershell scripts. Here are some examples, and you can find more in technet.

http://gallery.technet.microsoft.com/office/Script-to-convert-Word-f702844d

http://blogs.technet.com/b/heyscriptingguy/archive/2010/09/06/save-a-microsoft-excel-workbook-as-a-pdf-file-by-using-powershell.aspx

first, you probably can read this:

http://technet.microsoft.com/en-us/scriptcenter/dd742371.aspx


You can use docto its a really simple command line utility that allows you to convert Word Documents to pdf or any other format.

https://github.com/tobya/DocTo

as simple as

docto -f C:\Directory\MyFile.doc -O "C:\Output Directory\MyTextFile.pdf" -T wdFormatPDF