PDFFormattedTextBlock¶
Namespace: O2S.Components.PDF4NET.Graphics.FormattedContent
Defines a formatted block of text.
Inheritance Object → PDFFormattedBlock → PDFFormattedTextBlock
Remarks
All text in the block shares the same formatting attributes.
Constructors¶
PDFFormattedTextBlock()¶
Initializes a new PDFFormattedTextBlock object.
PDFFormattedTextBlock(String)¶
Initializes a new PDFFormattedTextBlock object.
Parameters
text String
Initial text.
PDFFormattedTextBlock(String, PDFFont)¶
Initializes a new PDFFormattedTextBlock object.
Parameters
text String
Initial text.
font PDFFont
For used for displaying the text.
Properties¶
Action¶
Gets or sets the action.
Property Value
PDFAction
The action to be executed when the block is clicked.
BackgroundBaselineOffset¶
Gets or sets the background baseline offset.
Property Value
Double
Offset from text baseline for drawing the background.
Remarks
The offset is given in PDF points. By default the background baseline matches the text baseline. If you want to lower it so that it covers the descent part of the text, you can set it to a negative value.
BackgroundColor¶
Gets or sets the background color.
Property Value
PDFBrush
The brush used to fill the text background.
Font¶
Gets or sets the font.
Property Value
PDFFont
The font used to display the text in the block.
StructureElement¶
Gets or sets the structure element.
Property Value
PDFStructureElement
The PDFStructureElement object associated with this block.
Remarks
Set this property to a structure element when the paragraph that includes this block does not have a structure element, otherwise the content will be tagged incorrectly.
Subscript¶
Gets the list of text blocks that are used as subscript for this block.
Property Value
List<PDFFormattedTextBlock>
List of subscript blocks for this block.
Superscript¶
Gets the list of text blocks that are used as superscript for this block.
Property Value
List<PDFFormattedTextBlock>
List of superscript blocks for this block.
Text¶
Gets or sets the text.
Property Value
String
The text content of the block.
TextColor¶
Gets or sets the text color.
Property Value
PDFBrush
The brush used to draw the text.
Methods¶
ToString()¶
Converts this object to string representation.
Returns
String
This object as string.