I am trying to convert docx files to pdf on my Ubuntu server using the command line but none of converters I tried so far seems to convert Word 2007/2010/2013 files correctly.
Appearently online converters can manage it without any problems but Web services are not an option because the files contain sensitive data. For tests I use this Word 2007 file because it contains some important elements (formulas, vector graphics, images, lists, etc.). I tested the following tools (partly from this post):
lowriter
(LibreOffice Writer) - incorrect output (the circle is supposed to be on the last page, not the first one)
unoconv
- the same as LibreOffice since it doesn't use its own converter. Converting to odt first and then to pdf messes the file completely up.
abiword --to=pdf filename.doc
- incorrect and incomplete (many elements are missing):
OpenOffice Writer - same result as for abiword
wvPDF
- crash with the following error message:
~$ wvPDF 2007_Office_DocEncryption.docx test.pdf
Current directory: /home/webmt/dev/test/
Some problem running latex.
Check for Errors in test.log
Continuing...
Conversion into dvi failed
Is there any way to convert docx files to PDF on Linux correctly? It would also help me if I knew it works for someone with any of the programs I already mentioned.
I will start a bounty as soon as SE lets me.
p.s. I'm using Ubuntu server 12.04
Conclusion:
I had to conclude that as for me, as for now, there is no reliable tool which will work with new MS Word formats and all kind of its elements on Ubuntu and create a one-to-one copy of docx files. None of tools I tested could convert the sample file properly. Since I will be facing very different kind of document versions/contents and the output quality has one of the highest priority, I will end up performing the conversions by means of VB macros in Word on a Windows server connected to my Linux.
I will set the post getting the best results as the accepted answer. However, the bounty was intended for a solution with absolutely correct conversion. Thanks to everyone, again.