How Word to PDF works
Turn a Word .docx document into a PDF. The text and basic structure are parsed by mammoth.js into HTML and then laid out into a PDF by pdf-lib.
This is a best-effort conversion without Microsoft Word: it focuses on the text and simple formatting rather than reproducing every advanced layout, so plain documents convert cleanly while richly formatted ones may differ. Only modern .docx files are supported, not the older .doc format.