开发者

Convert DOC to PDF from Command Line [closed]

开发者 https://www.devze.com 2023-04-08 00:25 出处:网络
Closed. This question is seeking recommendations for books, tools, software libraries, and more. It does not meet Stack Overflow guidelines. It is not currently accepting answers.
Closed. This question is seeking recommendations for books, tools, software libraries, and more. It does not meet Stack Overflow guidelines. It is not currently accepting answers.

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 question

Anyone 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.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号