Namespace TallComponents.PDF.Layout.Paragraphs
Class Fragment
The fragment class represents a piece of text.
The fragment is a part of a multiline text shape or a text paragraph. All text of a fragment is typeset equally. Fragments allow to contain pieces of text with different
font
,
color
or have a different decoration (bold, italic, underlined,...).
A fragment may refer to a paragraph throug a . In this case the text may contain fields that will be replaced by properties of the referenced paragraph.
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.
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.
Note that the TrueType functionality is available in the Professional edition only.
Double FontSize
Font size in points. Fontsize 0 will autosize when the fragment is single
in a MultilineTextShape.
Boolean HasContextFields
If set the text property is scanned for
fields and these are substituted during PDF generation.
If Reference is not , this property is ignored.
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.
Note Note
Get or set the note to be inserted.
Boolean Outline
Get or set if the fragment is rendered as an outline.
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.
FragmentReadDirection ReadDirection
Get or set the direction of the text fragment.
Paragraph Reference
Use this paragraph to resolve context fields.
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
The content of this fragment.
Color TextColor
Get or set the color of the text and decoration.
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.