fix(java): align DOCX rendering with Word for Latin documents - #188
Merged
Merged
Conversation
- Resolve paragraph-style text colors (Heading blue 4F81BD) and bullet markers from numbering definitions - Mirror .NET width metrics: Calibri-default documents use calibrated tables, other defaults wrap with actual TTF advances - Position center/right aligned text with actual font advances - Implement contextualSpacing, keepNext widow control, and top-of-page baseline (font ascent) with spacing-before suppression - Align auto-width table indent (-108 twips), cell vertical margin (0), and table spacing with Word/LibreOffice - Symbol-font bullet line height (1.21 factor) for Word parity Validation: 14_Thesis_Chapter 0.9856 -> 0.9932 (text similarity 1.0, 2/2 pages); issues66 CJK smoke test fixed; full issue/docx benchmark average 0.7224.
|
Note Currently processing new changes in this PR. This may take a few minutes, please wait... ⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Advanced Run ID: 📒 Files selected for processing (1)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Comment |
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 #187 — aligns the Java DOCX renderer with Word for Latin documents, bringing
14_Thesis_Chapterto 0.9932 (text similarity 1.0, 2/2 pages).Changes
rPr/w:colorapplied to runs without explicit color (Heading2 blue4F81BD).numPr→abstractNum→lvl; Symbol PUA bullet (\uF0B7) maps to•.EstimateCalibrTextWidth/EstimateWrapTextWidth: Calibri-default documents use calibrated tables; other defaults wrap with actual TTF advances; center/right alignment uses actual font advances.contextualSpacingcollapse,keepNextwidow control, top-of-page baseline (font ascent), spacing-before suppression at page top, no spacing collapse across tables.All changes are in
PoiDocxRenderer.java.Validation
mvn test: 78/79 passing (issues66CJK smoke test fixed; one pre-existing Vietnamese issue91 extraction failure remains).14_Thesis_Chapter: 0.9856 → 0.9932 (text 1.0, visual 0.983, 2/2 pages).