PDFFormattedParagraph¶
Namespace: O2S.Components.PDF4NET.Graphics.FormattedContent
Defines a formatted paragraph.
Inheritance Object → PDFFormattedParagraph
Remarks
A paragraph contains one or more formatted blocks, each one with its formatting attributes.
Constructors¶
PDFFormattedParagraph()¶
Initializes a new PDFFormattedParagraph object.
PDFFormattedParagraph(String)¶
Initializes a new PDFFormattedParagraph object.
Parameters
text String
Initial paragraph text.
PDFFormattedParagraph(String, PDFFont)¶
Initializes a new PDFFormattedParagraph object.
Parameters
text String
Initial paragraph text.
font PDFFont
Font used for displaying the text.
PDFFormattedParagraph(PDFFormattedBlock[])¶
Initializes a new PDFFormattedParagraph object.
Parameters
blocks PDFFormattedBlock[]
PDFFormattedParagraph(PDFFormattedParagraph)¶
Initializes a new PDFFormattedParagraph object.
Parameters
source PDFFormattedParagraph
Source paragraph.
Properties¶
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 paragraph background.
Blocks¶
Gets the list of formatted blocks that compose this paragraph.
Property Value
Bullet¶
Gets or sets the bullet text.
Property Value
PDFFormattedBlock
The text to be used as bullet for the paragraph.
Remarks
If this property is set to a PDFFormattedBlock object then the paragraph is considered to be part of a bulleted list.
FirstLineIndent¶
Gets or sets the indentation of the first paragraph line.
Property Value
Double
Value in points to indent the first line of the paragraph. If negative then it is left hanging indent.
ForceLongWordsWrap¶
Gets or sets a flag indicating whether long words should wrap if they do not fit entirely on a single line.
Property Value
Boolean
True if long words are wrapped at character level if they do not fit entirely on a single line.
HorizontalAlign¶
Gets or sets the horizontal align.
Property Value
PDFStringHorizontalAlign
The alignment of paragraph content on horizontal.
LeftIndentation¶
Gets or sets the left indentation.
Property Value
Double
Indentantion of the left side of the paragraph relative to the left margin of the drawing box.
LineSpacing¶
Gets or sets the line spacing in points.
Property Value
Double
The line spacing value, depends on the PDFFormattedParagraph.LineSpacingMode property.
Remarks
When the PDFFormattedParagraph.LineSpacingMode property is set to PDFFormattedParagraphLineSpacing.Exact the value of the line spacing
is specified in this property.
When the PDFFormattedParagraph.LineSpacingMode property is set to PDFFormattedParagraphLineSpacing.Multiple the value of the line spacing
is computed by multiplying the current line height with the value specified in this property.
LineSpacingMode¶
Gets or sets the line spacing for the paragraph.
Property Value
PDFFormattedParagraphLineSpacing
The line spacing for the paragraph.
Remarks
When this property is set to PDFFormattedParagraphLineSpacing.Exact the value of the line spacing
is specified in PDFFormattedParagraph.LineSpacing property.
When this property is set to PDFFormattedParagraphLineSpacing.Multiple the value of the line spacing
is computed by multiplying the current line height with the value specified in PDFFormattedParagraph.LineSpacing property.
RightIndentation¶
Gets or sets the right indentation.
Property Value
Double
Indentantion of the right side of the paragraph relative to the right margin of the drawing box.
SpacingAfter¶
Gets or sets the spacing after the paragraph.
Property Value
Double
The space in points below the paragraph.
SpacingBefore¶
Gets or sets the spacing before the paragraph.
Property Value
Double
The space in points above the paragraph content.
StructureElement¶
Gets or sets the structure element.
Property Value
PDFStructureElement
The PDFStructureElement object associated with this paragraph.
Remarks
When a paragraph has an associated structure element, the blocks within the paragraph should not have their own structure elements
otherwise the content will be tagged incorrectly.
The structure element does not include the PDFFormattedParagraph.Bullet so a structure element needs to be set on it.
TextDirection¶
Gets or sets the text direction.
Property Value
PDFTextDirection
The direction of the paragraph's text.
Methods¶
ToString()¶
Converts this object to string representation.
Returns
String
This object as string.