I need to batch convert a set of .doc
or .docx
files to .pdf
in terminal, not using a GUI.
It would be helpful if I could batch-process multiple files.
I would also like to maintain as much meta-data as possible.
I need to batch convert a set of .doc
or .docx
files to .pdf
in terminal, not using a GUI.
It would be helpful if I could batch-process multiple files.
I would also like to maintain as much meta-data as possible.
lowriter can be used as a command line tool (lowriter is a part of LibreOffice)
I do not have windows, so testdoc download from here
www.mltweb.com/prof/testdoc.doc
I use
unoconv
, which converts all formats supported byLibreOffice
.I use the following script:
--headless will prevent Libreoffice from opening 100s of files and eventually crashing if you try this with directories containing a lot of .doc files
In my opinion, the best way is with
unoconv
.First install the package:
and then convert to pdf using this command:
(Replace
XXYY.docx
with the name of your file.)