How to convert Word (doc) to PDF in linux?

I have a set of files in .doc format, that need to be converted to .pdf format. I am using Ubuntu linux.


Solution 1:

Alternative 1)

sudo apt-get install cups-pdf

Then navigate to System > Administration > Printing and create a new printer, set it as a PDF file printer, and name it as "pdf".

Then run:

oowriter -pt pdf your_word_file.doc

Now you'll find your .pdf file in ~/PDF.


Alternative 2)

sudo apt-get install wv tetex-extra ghostscript  
wvPDF test.doc test.pdf

If the tetex-extra package is not available with your distribution, try texlive-base plus texlive-latex-base:

sudo apt-get install wv texlive-base texlive-latex-base ghostscript  
wvPDF test.doc test.pdf

Solution 2:

You can use:

oowriter -convert-to pdf:writer_pdf_Export doc_file.doc

Solution 3:

Printing to PDF loses a lot of the document metadata (title, authorship, the headings tree that is used for navigation, and so on).

Install unoconv, convert with: unoconv -fpdf file1.doc file2.doc…