Repository navigation
HWP β PDF: tables floating in a table cell stay where νκΈ puts them (#49) - #91
Merged
Merged
Conversation
In an HWP, and in the HWPX rhwp's export-hwpx writes for it (META-INF/rhwp-hwp5-origin), rhwp follows the stored line positions. νκΈ stores the line of a paragraph that anchors a table (hp:pos vertRelTo="PARA", text above and below) under the table; in a cell taller than its text rhwp drew the table from that line instead of the paragraph's top, so the inner table of the consent form overlapped the "β» μ΄μ©κΈ°κ΄μ β¦" paragraph. The same document saved as HWPX by νκΈ (no marker) was laid out right. RhwpInput moves that line up to the paragraph's top (the line minus the table's offset, outer margins and height) when the HWPX comes from an HWP, the paragraph is in a table cell, holds nothing but that one table and the line really is under it. Nothing is drawn on the line, and rhwp then puts the table where νκΈ does. Hancom-saved HWPX files and paragraphs with text are left alone. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
KnifeLemon
added a commit
to SeoJCalive/Filee
that referenced
this pull request
Oct 16, 2026
main now has KnifeLemon#88 (donut groups, with review fixes) and KnifeLemon#80βKnifeLemon#91. The rotate and flip migration becomes settings schema 17, after main's v11βv16; the vector engine keeps main's summary and implements IImageTransformer. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Merged
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Fixes the latest report in #49: in a HWP file, a table inside a table cell (the μ°λ²/νμ μ 보λͺ table in the user's form) was drawn about 55 mm (156 pt) lower than in νκΈ, on top of the paragraph below it. The same document saved as HWPX was fine.
Cause
treatAsChar=0,vertRelTo=PARA,TOP_AND_BOTTOM) below the table.rhwp export-hwpxmarks its output withMETA-INF/rhwp-hwp5-origin. For files with that marker, rhwp follows the stored line positions.Fix
RhwpInput.PreparegainsAnchorTablesInCells. It applies only to HWPX converted from HWP, i.e. files with the marker.hp:tc/hp:subListthat holds just one such table, no text, and a single lineseg.vertposback to the paragraph start:vertpos β vertOffset β margins β height. That is only done when the result stays between the previous line and the original one.Result on the user's file
Test plan
RhwpInputTestsbuild a minimal HWPX in code. They cover the fix-up, paragraphs it must not touch, files without the marker, and a real rhwp render checked with PdfPig.dotnet formatpass.π€ Generated with Claude Code