Convert DOC to PDF from Command Line [closed]
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 5 years ago.
开发者_StackOverflow Improve this questionAnyone recommend a DOC to PDF converter that can be run from the command line? It seems like an easy requirement, but I have been coming up short on free solutions.
I recommend the OfficeToPDF command line application.
C:\>OfficeToPDF.exe /bookmarks /print /verbose test.docx test.pdf
Converting test.docx to test.pdf
Converting with Word converter
Completed Conversion
C:\>
I used this solution to automate the PDF generating using ANT.
I appreciate you are trying to do this from the command line but because you mentioned C#, the approach I use to is to first convert a doc to ps (PostScript) in C# which is relatively simple and well documented and then from the command line use Ghostscript to convert to PDF. Pls don't underestimate the tool from the basic looking website - it is amazing.
精彩评论