HtmlPaginator class

Splits HTML content into page-sized chunks by block-level elements.

Measures each block's actual height by building a TextSpan and laying it out with TextPainter at the exact page width. This matches what SelectableText.rich will render, giving accurate page breaks.

Constructors

HtmlPaginator({required double pageWidth, required double pageHeight, required double fontSize, String fontFamily = 'Segoe', String? fontPackage, TextDirection textDirection = TextDirection.ltr})

Properties

fontFamily → String
final
fontPackage → String?
final
fontSize → double
final
hashCode → int
The hash code for this object.
no setterinherited
pageHeight → double
final
pageWidth → double
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
textDirection → TextDirection
final

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
paginate(String htmlContent) → List<String>
toString() → String
A string representation of this object.
inherited

Operators

operator ==(Object other) → bool
The equality operator.
inherited