docx_file_viewer 1.0.5 copy "docx_file_viewer: ^1.0.5" to clipboard
docx_file_viewer: ^1.0.5 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.5 - 2026-09-29 #

Fixed #

  • Web: "Unsupported operation: _Namespace" when loading a document (#71). DocxView(file:) and DocxView(path:) read the document through dart:io's File, which doesn't work in browsers and fails with that opaque error. On the web, path is now loaded as a Flutter asset, and file fails with a message explaining to pass bytes instead (e.g. file_picker's withData: true). Native platforms are unchanged.
  • Load failures are now also logged to the console with their stack trace, not only shown on screen.
  • The example app now opens picked files on the web (it read PlatformFile.path, which file_picker doesn't provide in browsers).

Docs #

  • README: install snippet on 1.0.5, how to load documents on the web, and the showFootnotes/showEndnotes options.

1.0.4 - 2026-09-13 #

Added #

  • DocxViewConfig.showFootnotes (#83, restored per #121): boolean flag (default true). Set to false to hide the footnotes section at the bottom of the document and disable inline footnote reference taps.
  • DocxViewConfig.showEndnotes (#83, restored per #121): boolean flag (default true). Set to false to hide the endnotes section and disable inline endnote reference taps.
  • copyWith now supports showFootnotes and showEndnotes parameters (previously missing).
  • Restored test/issue_83_notes_config_test.dart โ€” 10 unit/widget tests covering config defaults, copyWith behaviour, and widget generator output.

Fixed #

  • The #83 fix above was implemented once already but was accidentally reverted shortly after landing (see #121) โ€” it is re-applied here, unchanged in behavior.

1.0.3 - 2026-07-26 #

๐Ÿ› Bug Fixes #

  • Image/shape sizing was too small โ€” DocxImage/DocxInlineImage/DocxShapeBlock dimensions are stored in points, but were passed straight through to Flutter's width/height as if already logical pixels; they're now correctly scaled via DocxUnits.pointsToPixels (points ร— 96/72), matching how the same document renders in Word
  • DocxUnits.twipsToPixels divided by 20 (twips โ†’ points) and stopped there instead of continuing on to pixels; fixed to twips โ†’ points โ†’ pixels (twips / 20 * 1.333)
  • List bullets stored as Word's Symbol/Wingdings Private-Use-Area glyphs (e.g. U+F0B7) rendered as a "tofu" box on platforms without that exact font installed; these now fall back to a portable Unicode bullet instead
  • Dotted/dashed paragraph and table borders were invisible โ€” Flutter's BorderSide only supports solid or none, and they were previously mapped to BorderStyle.none; they're now drawn solid instead of silently disappearing (the closer of the two approximations)

๐Ÿ”ง Improvements #

  • Bumped docx_creator dependency to 1.3.0

๐Ÿงช Tests #

  • Added test/rendering_accuracy_fixes_test.dart โ€” covers the twips/points โ†’ pixel scaling fix (image and shape sizing) and the Private-Use-Area bullet fallback

1.0.2 - 2026-05-16 #

โœจ New Features #

  • First-line indent (w:firstLine) โ€” positive indentFirstLine now prepends a zero-height WidgetSpan spacer so the first line is indented relative to the paragraph body
  • Hanging indent (w:hanging) โ€” negative indentFirstLine values reduce the container left padding to approximate hanging-indent layout
  • Line-rule variants โ€” lineRule values 'exact' and 'atLeast' are now handled separately from 'auto': exact clamps the scale to 0.5โ€“10, atLeast floors 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 height ConstrainedBox, multi-column vMerge placeholder child count, search highlight character ranges, and floating image Row layout

๐Ÿ”ง Improvements #

  • Extracted _resolveLineHeightScale() helper in ParagraphBuilder to centralise line-height logic
  • TableBuilder._buildRow() now tracks a parallel skipColSpans array alongside skipCounts to correctly group multi-column vertical merges
  • Added .claude/ and graphify-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 DocxWidgetGenerator as the central rendering engine
  • Added DocxViewTheme for comprehensive theming support
  • Added DocxSearchController for programmatic search control
  • Added BlockIndexCounter for search indexing

0.0.8 #

Fixed #

  • Bullet alignment improved
  • Heading styles corrected

0.0.7 #

Added #

  • Text alignment from styles now parsed
  • Background color and borders now parsed for paragraph and text elements

0.0.6 #

Fixed #

  • Styles were too much larger than expected
  • If color is defined, don't apply default color

0.0.5 #

Added #

  • Styles now parsed from file for paragraph and character
  • Text alignment now parsed from file

0.0.4 #

Fixed #

  • Ordered and unordered lists now render correctly

0.0.3 #

Fixed #

  • Resolved an issue where the divider was not being added correctly in the widget

Breaking Changes #

  • Removed a static function to facilitate easier addition of new features in the future

0.0.2 #

Fixed #

  • Tag-based text not rendered issue resolved

0.0.1 #

Added #

  • Initial release
17
likes
160
points
5.98k
downloads
screenshot

Documentation

API reference

Publisher

verified publisheralihassan143cool.blogspot.com

Weekly Downloads

A Flutter package for rendering DOCX files with native widgets. View, zoom, search, and interact with Word documents.

Homepage
Repository (GitHub)
View/report issues

Topics

#docx #word #viewer #document #office

License

Apache-2.0 (license)

Dependencies

docx_creator, flutter, url_launcher

More

Packages that depend on docx_file_viewer