You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Add HWP/HWPX input backend with layout provenance #3602
Add input support for Korean Hangul Word Processor documents (.hwp, .hwpx).
These formats are widely used in Korean public-sector, legal, academic, and enterprise workflows. Docling currently has no InputFormat for them, so users must convert HWP/HWPX outside Docling before they can use the CLI/API, exporters, chunkers, and the provenance-aware document model.
Ideally HWP/HWPX would flow through the normal Docling pipeline like the other supported formats, preserving the document's semantic structure where present (paragraphs, headings, lists, tables, pictures, formulas, footnotes/endnotes, page headers/footers, page breaks). The implementation approach is left to the maintainers.
Alternatives
Convert HWP/HWPX to an already-supported format outside Docling and ingest the result. This works today as a preprocessing step, but adds a manual conversion stage and gives Docling no direct control over warnings, errors, or provenance mapping.
Update on the plan. I am splitting this into two parts so each PR stays reviewable and dependency-light.
Part 1 (PR incoming): native HWPX backend, zero new dependencies. .hwpx is a zip+XML format (OWPML, KS X 6101), so it can be parsed with the stdlib and lxml alone. The PR registers InputFormat.HWPX and parses paragraphs, headings, lists, tables (including merged cells), and pictures natively, mirroring how the DOCX-family backends are scoped: modern XML format first, legacy binary format separately.
Part 2 (follow-up): binary .hwp via rhwp.
The binary format needs a real parser (CFB records, compression, legacy encodings), which is not a good fit for pure Python. I have proposed and implemented a versioned DocLang v0.6 XML export in rhwp, the actively maintained MIT-licensed Rust HWP parser (3.6k stars): edwardkim/rhwp#3131, edwardkim/rhwp#3132. Once that ships in a tagged rhwp release, a thin backend can route .hwp through it with version gating, or emit .dclg.xml for the existing InputFormat.XML_DOCLANG path (#3573).
Design feedback is welcome here or on the Part 1 PR, in particular on whether the Part 2 integration should be a subprocess call to the rhwp CLI (as with the Tesseract CLI OCR engine) or an optional Python binding.
20 made-up documents, each saved as .hwp (HWP 5) and .hwpx: 40 files of 7 to 14 KB
1 to 10 body paragraphs and 0 to 3 simple tables per document (up to 4 x 4 cells, some cells empty; no merged cells or nested tables), with mixed Korean and English text and symbols such as 「」, ※, ①, < and &
truth.json with the expected body paragraphs and table cell grids for each document
The files were written by a seeded generator through the rhwp engine (MIT), so the content is synthetic and contains no personal data. Feel free to copy any of them into the test data if they are useful.
Activity
feat: add experimental HWP/HWPX backend (DocLang routing via hangulang)
feat: add experimental HWP/HWPX backend (DocLang routing via hangulang)
myeolinmalchi commentedon Jul 23, 2026
Update on the plan. I am splitting this into two parts so each PR stays reviewable and dependency-light.
Part 1 (PR incoming): native HWPX backend, zero new dependencies.
.hwpxis a zip+XML format (OWPML, KS X 6101), so it can be parsed with the stdlib and lxml alone. The PR registersInputFormat.HWPXand parses paragraphs, headings, lists, tables (including merged cells), and pictures natively, mirroring how the DOCX-family backends are scoped: modern XML format first, legacy binary format separately.Part 2 (follow-up): binary
.hwpvia rhwp.The binary format needs a real parser (CFB records, compression, legacy encodings), which is not a good fit for pure Python. I have proposed and implemented a versioned DocLang v0.6 XML export in rhwp, the actively maintained MIT-licensed Rust HWP parser (3.6k stars): edwardkim/rhwp#3131, edwardkim/rhwp#3132. Once that ships in a tagged rhwp release, a thin backend can route
.hwpthrough it with version gating, or emit.dclg.xmlfor the existingInputFormat.XML_DOCLANGpath (#3573).Design feedback is welcome here or on the Part 1 PR, in particular on whether the Part 2 integration should be a subprocess call to the rhwp CLI (as with the Tesseract CLI OCR engine) or an optional Python binding.
etacbae6768-a11y commentedon Nov 9, 2026
In case it helps with testing the HWPX backend (and the
.hwppath later), we published a small set of generated test documents under CC0 1.0:https://github.com/etacbae6768-a11y/ttdu-hwp-plugins/tree/main/tests/samples/synth
.hwp(HWP 5) and.hwpx: 40 files of 7 to 14 KB「」,※,①,<and&truth.jsonwith the expected body paragraphs and table cell grids for each documentThe files were written by a seeded generator through the rhwp engine (MIT), so the content is synthetic and contains no personal data. Feel free to copy any of them into the test data if they are useful.
github-actions commentedon Nov 16, 2026
Classification labels added:
enhancement,priority:low.These labels are advisory. Maintainers can correct them. The workflow preserves these corrections.