TextFormattingOptions

TextFormattingOptions

Overview

TextFormattingOptions is a class in Aspose.PDF FOSS for .NET.

Represents text formatting options for a TextParagraph.

This class declares 2 methods for TextFormattingOptions objects in .NET programs. Available methods include: TextFormattingOptions. Public members are accessible to any .NET application after installing the Aspose.PDF FOSS for .NET package. Properties: BackgroundCornerRadii, BackgroundOpacity, BlockBackground, BlockBackgroundOutset, BottomMarginInsideRegion, BreakBoxDescentEm, and 31 more.

Properties

NameTypeAccessDescription
WrapModeWordWrapModeRead/WriteGets or sets the word wrap mode for the paragraph.
LineSpacingLineSpacingModeRead/WriteLine-spacing interpretation mode.
LineSpacingPointsdoubleRead/WriteLine-spacing value in points (internal extension — the public API exposes the mode only).
FirstLineIndentfloatRead/WriteIndent applied to the first line of the paragraph (points).
HangingBreakSpaceboolRead/WriteWhether the space that separated a finished line from the word that overflowed it HANGS past the measure instead of being dropped.
UnclippedLinesboolRead/WriteThe paragraph’s lines are not clipped to its band: a glyph that overhangs the measure (a serif’s left bearing, a descender past the last line) is drawn whole, as a layout that never clips text draws it.
SegmentsFlowAsRunsboolRead/WriteThe fragment’s segments flow as RUNS of one paragraph: the text wraps at spaces across them (a word split between two segments stays one word), every line is drawn run by run in each segment’s own face, size and colour, and a line is as tall as the tallest line box among the runs on it, seated on the largest run’s ascent – a small run beside a large one shares the large one’s baseline.
RunLineBoxMultiplierdouble?Read/WriteFor segments that flow as runs (SegmentsFlowAsRuns) in a declared line box: a line is this multiple of its HIGHEST ascent plus its DEEPEST descent tall, whichever runs reach them, and seats its baseline half the surplus under its top – the rule of a typesetter whose leading multiplies the line’s own extent, so runs in faces of different proportions box together.
RunTabStopsTabStops?Read/WriteFor segments that flow as runs (SegmentsFlowAsRuns): the stops a tab segment (IsTab) goes to, measured from where each line starts.
RunTabIntervaldouble?Read/WriteFor segments that flow as runs: how far apart the default tab positions stand for a tab with no stop past it - the next multiple of this from where its line starts, and never past the line’s end.
MinOrphanLinesintRead/WriteThe fewest lines of the paragraph that may stand at the bottom of a page when it breaks there; with fewer room left the whole paragraph starts the next page, unless it already stands at the top of one.
MinWidowLinesintRead/WriteThe fewest lines of the paragraph that may be carried to the next page when it breaks; with fewer, lines are moved over to make them up - at most MaxWidowLinesMoved, and never so many that the lines left behind fall under MinOrphanLines (or one).
MaxWidowLinesMovedintRead/WriteThe most lines MinWidowLines may move over to the next page.
MoveWholeOnWidowViolationboolRead/WriteWhen too few lines would be carried over and moving lines cannot make them up (MinWidowLines), the whole paragraph starts the next page instead of breaking as it would; off (the default), it breaks as it would.
UnderlineStyleTextDecorationStyle?Read/WriteThe geometry of the underline drawn when IsUnderline is set; null (the default) keeps the flow’s own rule.
StrikeoutStyleTextDecorationStyle?Read/WriteThe geometry of the strike-through drawn when IsStrikeOut is set; null (the default) keeps the flow’s own rule.
SkewdoubleRead/WriteA horizontal shear of the glyphs – the text matrix’s c component, the tangent of the angle the verticals lean by.
SlopedoubleRead/WriteA vertical shear of the glyphs – the text matrix’s b component, the tangent of the angle the baseline climbs by along the run.
SyntheticItalicLeandoubleRead/WriteA synthetic slant: the glyphs are sheared by this tangent (added to Skew), the way an italic is simulated from an upright face, and the run OCCUPIES lean × size more than its glyphs advance – the top of its em box leans that far past the last glyph – which the run after it, the wrap and the alignment take in; a rule under it reaches half of it.
SyntheticBoldPendoubleRead/WriteA synthetic weight: the glyphs are filled AND stroked with a pen this wide (2 Tr, w), the way a bold is simulated from a regular face, and the run OCCUPIES the pen’s width more than its glyphs advance – the stroke’s overhang – which the run after it, the wrap, the alignment and a rule under it all take in.
Opacitydouble?Read/WriteThe opacity of everything the fragment paints – fill AND stroke, ca and CA of one graphics state – as a real in 0..1.
FillOpacitydouble?Read/WriteThe fill opacity (ca) of the text alone, as a real in 0..1, used instead of the foreground colour’s byte alpha when set.
BackgroundOpacitydouble?Read/WriteThe fill opacity (ca) of the background, as a real in 0..1, used instead of the background colour’s byte alpha when set.
JustifySpacingRatiodouble?Read/WriteHow a line aligned Justify is stretched to the measure: by character AND word spacing (Tc, Tw) rather than by moving its words.
JustifyLastLineboolRead/WriteWhether the paragraph’s LAST line is stretched too (the way a “justify all” alignment does).
TopMarginAfterBreakboolRead/WriteWhether the fragment’s top margin is applied AGAIN where its lines continue on a new page or column.
BottomMarginInsideRegionboolRead/WriteWhether the fragment’s LAST line must leave room for its bottom margin above the region’s bottom edge: when it would not, that line goes on to the next page or column (a one-line fragment moves whole).
BreakBoxDescentEmdoubleRead/WriteWhere a block background (BlockBackground) ENDS on the page a split paragraph leaves: this many em below its last baseline there, instead of at that line’s box bottom.
LineFitsToDescentboolRead/WriteWhether a line fits the region when its text reaches no lower than the region’s bottom (or the room its paragraph keeps for its bottom margin): the half of the surplus leading below a line’s descent may fall past it.
LinePositionDecimalsint?Read/WriteThe decimals each wrapped line’s origin is written with: every line lands on its own origin rounded to them, halves away from zero, rather than one leading below the last.
BlockBackgroundOutsetMarginInfo?Read/WriteHow far a block background (BlockBackground) reaches OUTSIDE the block’s box on each side, painting only – nothing else moves.
BackgroundCornerRadiiCornerRadii?Read/WriteThe corners of a RUN’s background (a segment flowing as a run, see SegmentsFlowAsRuns, with a BackgroundColor): the box behind the run’s text on each line it reaches - its advance wide, its line box’s ascent and descent tall - is rounded at these corners, each line’s piece a whole rounded box.
RunBorderBorderInfo?Read/WriteA border around a RUN’s box (a segment flowing as a run, see SegmentsFlowAsRuns): the box behind its text - its advance wide, its line box’s ascent and descent tall - grown by the border’s bands, painted as a block’s border is (rounded with BackgroundCornerRadii), a background filling it out to the bands’ outer edge.
BlockBackgroundboolRead/WriteWhether a background colour covers the paragraph’s BLOCK box – one rectangle over its line boxes, the full content width – instead of highlighting each line’s own ink.
SeatOnFlowPageboolRead/WriteWhether a caller-positioned fragment belongs to the page the FLOW HAS REACHED rather than the page it was added to.
SubsequentLinesIndentfloatRead/WriteIndent applied to lines after the first (points).
HyphenSymbolstringRead/WriteSymbol used at line breaks when hyphenation is in effect (default “-”).

Methods

SignatureDescription
TextFormattingOptions()Creates options with WrapMode Undefined (wrap by width) and LineSpacing FontSize.
TextFormattingOptions(wrapMode: WordWrapMode)Construct with an explicit wrap mode.

See Also

 English