Article may be outdated

This article is 86 days old. Some details may have changed since publication.

Hacker News·3 min read·hard

Show HN: DOM-docx – HTML to native, editable Word docs (MIT)

F
fishbone
Show HN: DOM-docx – HTML to native, editable Word docs (MIT)
✦AI Summary

DOM-docx is a new open-source library that converts semantic HTML fragments into native, editable Microsoft Word documents. It emphasizes structural fidelity and avoids layout hacks by using a visual regression testing loop.

Why it matters

This tool provides a robust solution for developers needing to generate complex, programmatically created documents without relying on heavy browser-based dependencies.

✦Dive DeeperCreate a free account to unlock

Convert semantic HTML fragments to native, editable Word documents (OOXML): paragraphs, runs, lists, tables, images. Not screenshots or layout hacks.

Live demo: dom-docx.com . Try the converter, browse showcases, read the learn guide.

Built with a visual regression loop: render HTML in Chromium, convert to docx, rasterize via LibreOffice, score layout + structural fidelity against a human-validated metric, iterate. Latest scores: TEST-SCORES.md · methodology: SCORING.md .

npm install dom-docx Requires Node.js ≥ 20 . No browser or Playwright is needed for the default inline path.

Continue reading on Headlinne

Create a free account to read the full article.

Read full article →
technology
✦

Get smarter about the news

Sign up free for a feed built around what you actually care about, Dive Deeper research on any story, and the full text of every article.

Create free account

Already have an account? Sign in