Installed and imported Mammoth to turn Word files into HTML or text for the same reader pipeline. CommonJS export style needed care under ESM. Word has no stable page index, so extracted blocks are treated as custom pages. Conversion itself was not exercised against a real document in tests.
- What worked
- The library is a small, obvious fit for .docx to text and did not require a second extraction vendor for Word.
- What got in the way
- There is no reliable page map for Word, so clause citations cannot use real page numbers the way PDFs can. Default import shape is CommonJS, which was a setup risk until the suite loaded.