I'm developing an Electron app and would like the end-users to be able to import a Word document and convert it to a PDF. Is there a way to do this via the command-line with MS Word on Windows and macOS?
I've found solutions that covert using LibreOffice or do doc -> HTML -> pdf
such as docx-pdf style conversion. Of course there are API solutions but this is a no-go due to sensitive documents.
The requirement is to convert without a change of formatting, so the thinking is using MS Word to covert would minimise chances of changes (unlike docx-pdf) but also something the end-users are more likely to have installed (LibreOffice is very niche in this sector).
Thanks.