Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Convert DOC to PDF from Command Line [closed]

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.

like image 218
user489041 Avatar asked Sep 26 '11 19:09

user489041


People also ask

Can I batch convert Word to PDF?

Batch Convert Word to PDF with Adobe Acrobat. Step 1: Save all the Word documents that you wish to convert in one folder. Step 2: Open Adobe Acrobat and select 'Create PDF' to begin the batch convert Word to PDF progress. Step 3: Choose 'Multiple Files' > 'Create Multiple PDF Files'.


2 Answers

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.

like image 98
Ptofanelli Avatar answered Oct 12 '22 22:10

Ptofanelli


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.

like image 44
Barry Kaye Avatar answered Oct 12 '22 21:10

Barry Kaye