docx_file_viewer 1.0.2
docx_file_viewer: ^1.0.2 copied to clipboard
A Flutter package for rendering DOCX files with native widgets. View, zoom, search, and interact with Word documents.
Changelog #
All notable changes to this project will be documented in this file.
1.0.2 - 2026-05-16 #
✨ New Features #
- First-line indent (
w:firstLine) — positiveindentFirstLinenow prepends a zero-heightWidgetSpanspacer so the first line is indented relative to the paragraph body - Hanging indent (
w:hanging) — negativeindentFirstLinevalues reduce the container left padding to approximate hanging-indent layout - Line-rule variants —
lineRulevalues'exact'and'atLeast'are now handled separately from'auto':exactclamps the scale to 0.5–10,atLeastfloors it at 1.0
🐛 Bug Fixes #
- Multi-column vertical merge placeholder — a cell spanning N columns across multiple rows previously produced N separate thin placeholders in continuation rows; it now correctly emits one wide placeholder whose width covers all spanned columns
🧪 Tests #
- Added
test/parser_test.dart— 5 unit tests covering the cascade rule, table grid matrix, crash immunity, first-line indent spacer, and line-rule variants - Added
test/widget_test.dart— 4 widget tests covering row heightConstrainedBox, multi-column vMerge placeholder child count, search highlight character ranges, and floating imageRowlayout
🔧 Improvements #
- Extracted
_resolveLineHeightScale()helper inParagraphBuilderto centralise line-height logic TableBuilder._buildRow()now tracks a parallelskipColSpansarray alongsideskipCountsto correctly group multi-column vertical merges- Added
.claude/andgraphify-out/to.gitignore
1.0.1 - 2026-01-07 #
🎉 Stable Release #
This release marks the stable 1.0.0 version with a complete architecture overhaul and significant feature improvements.
✨ New Features #
- Paged View Mode - Documents can now be rendered in distinct page blocks (print layout style) in addition to continuous scrolling
- Content-Aware Pagination - Smart page breaks based on content height estimation
- Embedded Font Loading - Full support for OOXML font embedding with deobfuscation
- Theme Color Resolution - Proper handling of theme colors with tint/shade modifiers
- Drop Cap Support - Rich drop cap rendering with proper text wrapping
- Floating Image Layout - Left/right floating images with text wrap
- Headers & Footers - First page, odd/even page header/footer support
- Footnotes & Endnotes - Interactive footnote/endnote references with tap-to-view dialog
- Table Conditional Formatting - Support for first row, last row, first column, last column, and banded styles
- Checkbox Support - Interactive checkbox rendering in documents
- Shape Rendering - Basic shape support (rectangles, text boxes)
🔧 Improvements #
- Search Navigation - Auto-scroll to search matches with dynamic alignment
- Style Resolution - Full style inheritance from named styles, paragraph, and run properties
- Color Resolution - Theme color, tint, and shade calculation
- Border Rendering - Complete border support for paragraphs and tables
- Performance - Optimized widget generation for large documents
🏗️ Architecture #
- Migrated to modular builder pattern (
ParagraphBuilder,TableBuilder,ListBuilder, etc.) - Introduced
DocxWidgetGeneratoras the central rendering engine - Added
DocxViewThemefor comprehensive theming support - Added
DocxSearchControllerfor programmatic search control - Added
BlockIndexCounterfor search indexing
0.0.7 #
Added #
- Text alignment from styles now parsed
- Background color and borders now parsed for paragraph and text elements
