Skip to content

Read HWPX into the document model: HWP/HWPX → DOCX without LibreOffice - #13

Merged
KnifeLemon merged 2 commits into
mainfrom
pr/13-hwpx-reader
Sep 30, 2026
Merged

KnifeLemon merged 2 commits into
mainfrom
pr/13-hwpx-reader

Conversation

@KnifeLemon

Copy link
Copy Markdown
Owner

A reader for HWPX files saved by 한글, rhwp and Filee. HWP is converted to HWPX by rhwp first, so HWP → DOCX no longer needs LibreOffice.

🤖 Generated with Claude Code

KnifeLemon and others added 2 commits October 1, 2026 07:43
HwpxReader is the inverse of HwpxWriter: it reads an .hwpx package into
HDocument, so HWPX (and HWP, which rhwp turns into HWPX first) can later be
written as DOCX, HTML or EPUB without Hancom Office or LibreOffice. It is not
registered as a converter yet; a reader registry picks it up by format id.

It reads files from 한글, rhwp's export-hwpx and Filee's own writer: elements
are matched by local name, hp:switch takes the exact HwpUnitChar branch (else
halves the doubled hp:default / legacy values), and every IDRef is resolved
through header.xml. Sections, page setup (NARROWLY = landscape), columns,
headers/footers, automatic page numbers, complete paragraph and character
shapes, outline headings, numberings and bullets, fields and hyperlinks,
bookmarks, notes, tables (spans, widths, heights, borders, fills, header
rows, captions, nesting), pictures, shapes, text boxes and groups are kept.
Objects without a place in the model are skipped and counted; encrypted
and DRM-wrapped files stop with a clear error.

Tests write documents from the DOCX, Markdown, XLSX and PPTX readers as HWPX,
read them back and compare, then write and read again for an identical
model; they also read rhwp's HWPX, the template saved by 한글, a package in
the style 한글 writes, and time a 100-page document.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
# Conflicts:
#	docs/ENGINES.md
@KnifeLemon KnifeLemon added the formats New formats and engines label Sep 30, 2026
@KnifeLemon
KnifeLemon merged commit bcd4e28 into main Sep 30, 2026
1 check failed
@KnifeLemon
KnifeLemon deleted the pr/13-hwpx-reader branch September 30, 2026 23:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

formats New formats and engines

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant