DO you know any library to convert Microsoft Office documents like Word (.doc) or Excel (xlsx) into PDF using NodeJS? I have been looking around with no luck. Thanks
Asked
Active
Viewed 6,146 times
7
-
1Any solutions so far? – Chamnap May 02 '16 at 10:46
-
There is now https://www.npmjs.com/package/@nativedocuments/docx-wasm for doc/docx (not Excel files) – JasonPlutext Jan 22 '19 at 22:46
1 Answers
11
Well, I think the best possible converting option would be using the LibreOffice headless command line option.
libreoffice --headless --convert-to pdf *.odt
So if you want to call from Node.js, you have to wrap the command line call into child process http://nodejs.org/api/child_process.html

Risto Novik
- 8,199
- 9
- 50
- 66
-
Couldn't find libreoffice command in windows. soffice seems to be the correct command located at C:\Program Files\LibreOffice\program – Damien Golding Sep 14 '18 at 08:49