Namespace TallComponents.PDF.Shapes
Class Fragment
The fragment class represents a piece of text as part of a multiline text shape.
All text of a fragment is typeset equally. Fragments allow to contain pieces of text with different
font
and
color
.
Syntax
public class Fragment : Object,ICloneable
Constructors
Fragment()
Initializes a new empty instance of the Fragment class.
Fragment(String)
Initialize a new instance of the Fragment class with given content.
Fragment(String,Double)
Initialize a new instance of the Fragment class with given content and fontsize.
Fragment(String,Font)
Initialize a new instance of the Fragment class with given content and font.
Fragment(String,Font,Double)
Initialize a new instance of the Fragment class with given content, font and fontsize.
Properties
ActionCollection Actions
The actions that the PDF reader will execute when this link is clicked.
Brush Background
Get or set the brush that is used to paint the background of the fragment.
Boolean Bold
Get or set if the text appears bold.
Brush Brush
The brush that is used to fill this text. (default = Black - SolidBrush)
Boolean DoubleUnderline
Get or set if the fragment is rendered with a double underline.
Font Font
The font for this fragment. You can use one of the 14 standard PDF fonts or a TrueType font.
Double FontSize
Font size in points. Fontsize 0 will autosize when the fragment is single
in a MultilineTextShape.
Boolean Italic
Get or set if the text appears italic.
Boolean KeepWithNext
Get or set if the next fragment is started on the same line as this fragment.
Boolean Overline
Get or set if the fragment is rendered with an overline.
Pen Pen
Used to draw the curves on this text. (default = null)
Boolean PreserveWhiteSpace
Preserve spaces, tabs (\t), carriage returns (\r) and line feeds (\n).
Set this property to true to include preformatted text like code fragments.
ReadDirection ReadDirection
Get or set the direction of the text fragment.
Boolean ShowLinkBorder
If true a black 1pt outline is drawn around the clickable area of the link.
Boolean StrikeOut
Get or set if the fragment is rendered striked out.
Boolean Subscript
Get or set if the fragment is rendered as subscript.
Boolean Superscript
Get or set if the fragment is rendered as superscript.
Boolean SuppressSpaceBefore
Suppress the insertion of an extra space between two successive fragments.
Int32 TabSize
If PreserveWhiteSpace is true, each tab character (\t) is replaced by
TabSize number of spaces. Default is 3.
String Text
Get or set the content of this fragment.
Color TextColor
Get or set the color of the text and decoration, see remarks
Boolean TrimStartOfLine
If PreserveWhiteSpace is true, for each (see remarks) line the leading whitespaces will be removed.
Boolean Underline
Get or set if the fragment is rendered with an underline.