PdfTextLayout class
Namespace: PdfNetStack.Drawing
Assembly: PdfNetStack.dll
Package: PdfNetStack
A paragraph broken into lines for a given width: the Unicode line breaking algorithm finds break opportunities, the bidirectional algorithm orders each line, and an OpenType shaper forms the glyphs. Measure with it, then draw it with DrawText.
public sealed class PdfTextLayoutInheritance
Remarks
Section titled “Remarks”Lines are filled greedily, breaking at spaces, at soft hyphens and, with Hyphenator, inside words. A word still wider than the line is broken between characters. Trailing spaces do not count toward a line’s width. Line height follows the CSS model: each span’s font contributes its ascent and descent, spread by the paragraph’s line height.
Properties
Section titled “Properties”Height
Section titled “ Height”Total height of all lines.
public double Height { get; }Property Value
Section titled “Property Value”The lines, top to bottom.
public IReadOnlyList<PdfTextLine> Lines { get; }Property Value
Section titled “Property Value”MaxWidth
Section titled “ MaxWidth”The width lines were broken for.
public double MaxWidth { get; }Property Value
Section titled “Property Value”Paragraph
Section titled “ Paragraph”The laid out paragraph.
public PdfParagraph Paragraph { get; }Property Value
Section titled “Property Value”Width of the widest line.
public double Width { get; }Property Value
Section titled “Property Value”Methods
Section titled “Methods”Create(PdfParagraph, double)
Section titled “ Create(PdfParagraph, double)”Breaks paragraph into lines no wider than width points.
public static PdfTextLayout Create(PdfParagraph paragraph, double width)Parameters
Section titled “Parameters”paragraph PdfParagraph
width double
Returns
Section titled “Returns”Exceptions
Section titled “Exceptions”A character has no glyph in its style’s font or fallbacks.