How to convert Word (doc) to PDF in centos6.5

0

I used the libreoffice effect is not good, word layout is a mess. Also used OpenOffice,but word2007, WORD2010 use error. Tried cup-pdf, but i do not know how to set the effective without GUI.I want to make a command word to PDF function on the CentOS server.

scpzc

Posted 2016-10-10T07:07:15.613

Reputation: 1

Not much to go on for the nature of the problem. LO and OO can generally handle doc files, but it isn't their native format, so there may be some formatting that isn't run-of-the-mill that they have difficulty with. Are you sure the document isn't corrupted (looks fine in Word)? One option might be to use a web service, like https://smallpdf.com/, http://www.sejda.com/, or https://online2pdf.com/ (even if just to verify that the document is convertible). There are some PDF toolkits to roll your own, but I've never gotten into those.

– fixer1234 – 2016-10-10T07:45:29.963

Answers

0

Have you tried this command:

oowriter -pt pdf file.doc

What it is the output?

If pdf-cup is not working you can try with this one:

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

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

mortueta

Posted 2016-10-10T07:07:15.613

Reputation: 102

[root@iZ94hgtrav1Z ~]# oowriter -pt pdf file.doc Failed to open display Warning: -pt is deprecated. Use --pt instead. – scpzc – 2016-10-10T09:13:20.107

wvPDF test.doc test.pdf Could not find required program 'latex' – scpzc – 2016-10-10T09:15:37.890

If you do nto have latex in your distribution you can try with: sudo apt-get install wv texlive-base texlive-latex-base ghostscript
wvPDF test.doc test.pdf
– mortueta – 2016-10-10T10:52:51.860