Table of Contents

Class TextElement

Namespace
EvoPdf
Assembly
evohtmltopdf.dll

Represents a text element to be added to a PDF page or template.

[ClassInterface(ClassInterfaceType.AutoDual)]
public class TextElement : PageGraphicElement
Inheritance
TextElement
Inherited Members

Constructors

TextElement(float, float, float, float, string, PdfFont)

Constructs a paginable text element that will be rendered in the specified rectangle using the specified width, height and font.

The Unicode text is supported only for embedded true type fonts. A flag indicating if the font is embedded or not in PDF can be specified when the font is added to PDF document.

If the text pagination is not allowed ( Paginate property is false ), the text will be written on current page, the rendered text height being given by the minimum between the specified height and the available height on page. The remaining text and the text bounds inside the current page are returned in the AddTextElementResult object when the element is added to a renderer.

If the text pagination is allowed ( Paginate property is true ) and the text needs pagination (the specified height is bigger than the available space on page), the height parameter will be ignored and the text will be rendered to the end using the necessary height. The text bounds inside the last page and the last page index are returned in the AddTextElementResult object when the element is added to a renderer.

If the text pagination is allowed but the text does not need pagination (the specified height is less than the available space on page), the rendered text will be truncated to fit the specified height. The text bounds inside the current page and the last page index are returned in the AddTextElementResult object when the element is added to a renderer.

public TextElement(float x, float y, float width, float height, string text, PdfFont font)

Parameters

x float

The start x coordinate where the text will be rendered

y float

The start y coordinate where the text

width float

The width of the destination rectangle. Use a negative value allow text to flow freely in PDF page width.

height float

The height of the destination rectangle. Use a negative value allow text to flow freely in PDF document.

text string

The text to be rendered

font PdfFont

The text font. The true type fonts must be embedded in PDF when it is added to the document in order to support Unicode texts.

TextElement(float, float, float, float, string, PdfFont, PdfColor)

Constructs a paginable text element that will be rendered in the specified rectangle using the specified width, height, font and color.

The Unicode text is supported only for embedded true type fonts. A flag indicating if the font is embedded or not in PDF can be specified when the font is added to PDF document.

If the text pagination is not allowed ( Paginate property is false ), the text will be written on current page, the rendered text height being given by the minimum between the specified height and the available height on page. The remaining text and the text bounds inside the current page are returned in the AddTextElementResult object when the element is added to a renderer.

If the text pagination is allowed ( Paginate property is true ) and the text needs pagination (the specified height is bigger than the available space on page), the height parameter will be ignored and the text will be rendered to the end using the necessary height. The text bounds inside the last page and the last page index are returned in the AddTextElementResult object when the element is added to a renderer.

If the text pagination is allowed but the text does not need pagination (the specified height is less than the available space on page), the rendered text will be truncated to fit the specified height. The text bounds inside the current page and the last page index are returned in the AddTextElementResult object when the element is added to a renderer.

public TextElement(float x, float y, float width, float height, string text, PdfFont font, PdfColor textColor)

Parameters

x float

The start x coordinate where the text will be rendered

y float

The start y coordinate where the text

width float

The width of the destination rectangle. Use a negative value allow text to flow freely in PDF page width.

height float

The height of the destination rectangle. Use a negative value allow text to flow freely in PDF document.

text string

The text to be rendered

font PdfFont

The text font. The true type fonts must be embedded in PDF when it is added to the document in order to support Unicode texts.

textColor PdfColor

The text color

TextElement(float, float, float, float, string, StandardCJKFont, float, PdfColor)

Constructs a paginable text element that will be rendered in the specified rectangle using the specified width, height, system font and color.

The Unicode text is supported only for embedded true type fonts. A font can be embedded in the generated PDF document if the EmbedSysFont property was set on true.

If the text pagination is not allowed ( Paginate property is false ), the text will be written on current page, the rendered text height being given by the minimum between the specified height and the available height on page. The remaining text and the text bounds inside the current page are returned in the AddTextElementResult object when the element is added to a renderer.

If the text pagination is allowed ( Paginate property is true ) and the text needs pagination (the specified height is bigger than the available space on page), the height parameter will be ignored and the text will be rendered to the end using the necessary height. The text bounds inside the last page and the last page index are returned in the AddTextElementResult object when the element is added to a renderer.

If the text pagination is allowed but the text does not need pagination (the specified height is less than the available space on page), the rendered text will be truncated to fit the specified height. The text bounds inside the current page and the last page index are returned in the AddTextElementResult object when the element is added to a renderer.

public TextElement(float x, float y, float width, float height, string text, StandardCJKFont standardCJK, float fontSizePoints, PdfColor textColor)

Parameters

x float

The start x coordinate where the text will be rendered

y float

The start y coordinate where the text

width float

The width of the destination rectangle. Use a negative value allow text to flow freely in PDF page width.

height float

The height of the destination rectangle. Use a negative value allow text to flow freely in PDF document.

text string

The text to be rendered

standardCJK StandardCJKFont

The text font standard CJK family.

fontSizePoints float

The text font size in points

textColor PdfColor

The text color

TextElement(float, float, float, float, string, StdFontBaseFamily, float, PdfColor)

Constructs a paginable text element that will be rendered in the specified rectangle using the specified width, height, system font and color.

The Unicode text is supported only for embedded true type fonts. A font can be embedded in the generated PDF document if the EmbedSysFont property was set on true.

If the text pagination is not allowed ( Paginate property is false ), the text will be written on current page, the rendered text height being given by the minimum between the specified height and the available height on page. The remaining text and the text bounds inside the current page are returned in the AddTextElementResult object when the element is added to a renderer.

If the text pagination is allowed ( Paginate property is true ) and the text needs pagination (the specified height is bigger than the available space on page), the height parameter will be ignored and the text will be rendered to the end using the necessary height. The text bounds inside the last page and the last page index are returned in the AddTextElementResult object when the element is added to a renderer.

If the text pagination is allowed but the text does not need pagination (the specified height is less than the available space on page), the rendered text will be truncated to fit the specified height. The text bounds inside the current page and the last page index are returned in the AddTextElementResult object when the element is added to a renderer.

public TextElement(float x, float y, float width, float height, string text, StdFontBaseFamily standardFamily, float fontSizePoints, PdfColor textColor)

Parameters

x float

The start x coordinate where the text will be rendered

y float

The start y coordinate where the text

width float

The width of the destination rectangle. Use a negative value allow text to flow freely in PDF page width.

height float

The height of the destination rectangle. Use a negative value allow text to flow freely in PDF document.

text string

The text to be rendered

standardFamily StdFontBaseFamily

The text font standard PDF family

fontSizePoints float

The text font size in points

textColor PdfColor

The text color

TextElement(float, float, float, float, string, byte[], float, FontStyle, PdfColor)

Constructs a paginable text element that will be rendered in the specified rectangle using the specified width, height, system font and color.

The Unicode text is supported only for embedded true type fonts. A font can be embedded in the generated PDF document if the EmbedSysFont property was set on true.

If the text pagination is not allowed ( Paginate property is false ), the text will be written on current page, the rendered text height being given by the minimum between the specified height and the available height on page. The remaining text and the text bounds inside the current page are returned in the AddTextElementResult object when the element is added to a renderer.

If the text pagination is allowed ( Paginate property is true ) and the text needs pagination (the specified height is bigger than the available space on page), the height parameter will be ignored and the text will be rendered to the end using the necessary height. The text bounds inside the last page and the last page index are returned in the AddTextElementResult object when the element is added to a renderer.

If the text pagination is allowed but the text does not need pagination (the specified height is less than the available space on page), the rendered text will be truncated to fit the specified height. The text bounds inside the current page and the last page index are returned in the AddTextElementResult object when the element is added to a renderer.

public TextElement(float x, float y, float width, float height, string text, byte[] fontData, float fontSizePoints, FontStyle fontStyle, PdfColor textColor)

Parameters

x float

The start x coordinate where the text will be rendered

y float

The start y coordinate where the text

width float

The width of the destination rectangle. Use a negative value allow text to flow freely in PDF page width.

height float

The height of the destination rectangle. Use a negative value allow text to flow freely in PDF document.

text string

The text to be rendered

fontData byte[]

The text font data

fontSizePoints float

The text font size in points

fontStyle FontStyle

The text font style

textColor PdfColor

The text color

TextElement(float, float, float, float, string, Font, PdfColor)

Constructs a paginable text element that will be rendered in the specified rectangle using the specified width, height, system font and color.

The Unicode text is supported only for embedded true type fonts. A font can be embedded in the generated PDF document if the EmbedSysFont property was set on true.

If the text pagination is not allowed ( Paginate property is false ), the text will be written on current page, the rendered text height being given by the minimum between the specified height and the available height on page. The remaining text and the text bounds inside the current page are returned in the AddTextElementResult object when the element is added to a renderer.

If the text pagination is allowed ( Paginate property is true ) and the text needs pagination (the specified height is bigger than the available space on page), the height parameter will be ignored and the text will be rendered to the end using the necessary height. The text bounds inside the last page and the last page index are returned in the AddTextElementResult object when the element is added to a renderer.

If the text pagination is allowed but the text does not need pagination (the specified height is less than the available space on page), the rendered text will be truncated to fit the specified height. The text bounds inside the current page and the last page index are returned in the AddTextElementResult object when the element is added to a renderer.

public TextElement(float x, float y, float width, float height, string text, Font font, PdfColor textColor)

Parameters

x float

The start x coordinate where the text will be rendered

y float

The start y coordinate where the text

width float

The width of the destination rectangle. Use a negative value allow text to flow freely in PDF page width.

height float

The height of the destination rectangle. Use a negative value allow text to flow freely in PDF document.

text string

The text to be rendered

font Font

The text font as a System.Drawing.Font object.

textColor PdfColor

The text color

TextElement(float, float, float, float, string, string, float, FontStyle, PdfColor)

Constructs a paginable text element that will be rendered in the specified rectangle using the specified width, height, system font and color.

The Unicode text is supported only for embedded true type fonts. A font can be embedded in the generated PDF document if the EmbedSysFont property was set on true.

If the text pagination is not allowed ( Paginate property is false ), the text will be written on current page, the rendered text height being given by the minimum between the specified height and the available height on page. The remaining text and the text bounds inside the current page are returned in the AddTextElementResult object when the element is added to a renderer.

If the text pagination is allowed ( Paginate property is true ) and the text needs pagination (the specified height is bigger than the available space on page), the height parameter will be ignored and the text will be rendered to the end using the necessary height. The text bounds inside the last page and the last page index are returned in the AddTextElementResult object when the element is added to a renderer.

If the text pagination is allowed but the text does not need pagination (the specified height is less than the available space on page), the rendered text will be truncated to fit the specified height. The text bounds inside the current page and the last page index are returned in the AddTextElementResult object when the element is added to a renderer.

public TextElement(float x, float y, float width, float height, string text, string fontFamily, float fontSizePoints, FontStyle fontStyle, PdfColor textColor)

Parameters

x float

The start x coordinate where the text will be rendered

y float

The start y coordinate where the text

width float

The width of the destination rectangle. Use a negative value allow text to flow freely in PDF page width.

height float

The height of the destination rectangle. Use a negative value allow text to flow freely in PDF document.

text string

The text to be rendered

fontFamily string

The text font family name.

fontSizePoints float

The text font size in points

fontStyle FontStyle

The text font style

textColor PdfColor

The text color

TextElement(float, float, float, string, PdfFont)

Constructs a paginable text element that will be rendered at the specified (x,y) position using the specified width and font. The height of the rendered text will be auto-determined.

The Unicode text is supported only for embedded true type fonts. A flag indicating if the font is embedded or not in PDF can be specified when the font is added to PDF document.

If the text pagination is not allowed ( Paginate property is false ), the text will be written on current page, the rendered text height being limited by the available height on page. The remaining text and the text bounds inside the current page are returned in the AddTextElementResult object when the element is added to a renderer.

If the text pagination is allowed ( Paginate property is true ) and the text needs pagination (the auto-determined text height is bigger than the available space on page), all the text will be rendered using the necessary height. The text bounds inside the last page and the last page index are returned in the AddTextElementResult object when the element is added to a renderer.

public TextElement(float x, float y, float width, string text, PdfFont font)

Parameters

x float

The start x coordinate where the text will be rendered

y float

The start y coordinate where the text

width float

The width of the destination rectangle. Use a negative value allow text to flow freely in PDF page width.

text string

The text to be rendered

font PdfFont

The text font. The true type fonts must be embedded in PDF when it is added to the document in order to support Unicode texts.

TextElement(float, float, float, string, PdfFont, PdfColor)

Constructs a paginable text element that will be rendered at the specified (x,y) position using the specified width, font and color. The height of the rendered text will be auto-determined.

The Unicode text is supported only for embedded true type fonts. A flag indicating if the font is embedded or not in PDF can be specified when the font is added to PDF document.

If the text pagination is not allowed ( Paginate property is false ), the text will be written on current page, the rendered text height being limited by the available height on page. The remaining text and the text bounds inside the current page are returned in the AddTextElementResult object when the element is added to a renderer.

If the text pagination is allowed ( Paginate property is true ) and the text needs pagination (the auto-determined text height is bigger than the available space on page), all the text will be rendered using the necessary height. The text bounds inside the last page and the last page index are returned in the AddTextElementResult object when the element is added to a renderer.

public TextElement(float x, float y, float width, string text, PdfFont font, PdfColor textColor)

Parameters

x float

The start x coordinate where the text will be rendered

y float

The start y coordinate where the text

width float

The width of the destination rectangle. Use a negative value allow text to flow freely in PDF page width.

text string

The text to be rendered

font PdfFont

The text font. The true type fonts must be embedded in PDF when it is added to the document in order to support Unicode texts.

textColor PdfColor

The text color

TextElement(float, float, string, PdfFont)

Constructs a paginable text element that will be rendered at the specified (x,y) position using the specified font. The height of the rendered text will be auto-determined. The width is the available width in page.

The Unicode text is supported only for embedded true type fonts. A flag indicating if the font is embedded or not in PDF can be specified when the font is added to PDF document.

If the text pagination is not allowed ( Paginate property is false ), the text will be written on current page, the rendered text height being limited by the available height on page. The remaining text and the text bounds inside the current page are returned in the AddTextElementResult object when the element is added to a renderer.

If the text pagination is allowed ( Paginate property is true ) and the text needs pagination (the auto-determined text height is bigger than the available space on page), all the text will be rendered using the necessary height. The text bounds inside the last page and the last page index are returned in the AddTextElementResult object when the element is added to a renderer.

public TextElement(float x, float y, string text, PdfFont font)

Parameters

x float

The start x coordinate where the text will be rendered

y float

The start y coordinate where the text

text string

The text to be rendered

font PdfFont

The text font. The true type fonts must be embedded in PDF when it is added to the document in order to support Unicode texts.

TextElement(float, float, string, PdfFont, PdfColor)

Constructs a paginable text element that will be rendered at the specified (x,y) position using the specified font and color. The height of the rendered text will be auto-determined. The width is the available width in page.

The Unicode text is supported only for embedded true type fonts. A flag indicating if the font is embedded or not in PDF can be specified when the font is added to PDF document.

If the text pagination is not allowed ( Paginate property is false ), the text will be written on current page, the rendered text height being limited by the available height on page. The remaining text and the text bounds inside the current page are returned in the AddTextElementResult object when the element is added to a renderer.

If the text pagination is allowed ( Paginate property is true ) and the text needs pagination (the auto-determined text height is bigger than the available space on page), all the text will be rendered using the necessary height. The text bounds inside the last page and the last page index are returned in the AddTextElementResult object when the element is added to a renderer.

public TextElement(float x, float y, string text, PdfFont font, PdfColor textColor)

Parameters

x float

The start x coordinate where the text will be rendered

y float

The start y coordinate where the text

text string

The text to be rendered

font PdfFont

The text font. The true type fonts must be embedded in PDF when it is added to the document in order to support Unicode texts.

textColor PdfColor

The text color

TextElement(float, float, string, StandardCJKFont)

Constructs a paginable text element that will be rendered at the specified (x,y) position using the specified system font. The height of the rendered text will be auto-determined. The width is the available width in page.

The Unicode text is supported only for embedded true type fonts. A flag indicating if the font is embedded or not in PDF can be specified when the font is added to PDF document.

If the text pagination is not allowed ( Paginate property is false ), the text will be written on current page, the rendered text height being limited by the available height on page. The remaining text and the text bounds inside the current page are returned in the AddTextElementResult object when the element is added to a renderer.

If the text pagination is allowed ( Paginate property is true ) and the text needs pagination (the auto-determined text height is bigger than the available space on page), all the text will be rendered using the necessary height. The text bounds inside the last page and the last page index are returned in the AddTextElementResult object when the element is added to a renderer.

public TextElement(float x, float y, string text, StandardCJKFont standardCJK)

Parameters

x float

The start x coordinate where the text will be rendered

y float

The start y coordinate where the text

text string

The text to be rendered

standardCJK StandardCJKFont

The text font standard CJK family.

TextElement(float, float, string, StdFontBaseFamily)

Constructs a paginable text element that will be rendered at the specified (x,y) position using the specified system font. The height of the rendered text will be auto-determined. The width is the available width in page.

The Unicode text is supported only for embedded true type fonts. A flag indicating if the font is embedded or not in PDF can be specified when the font is added to PDF document.

If the text pagination is not allowed ( Paginate property is false ), the text will be written on current page, the rendered text height being limited by the available height on page. The remaining text and the text bounds inside the current page are returned in the AddTextElementResult object when the element is added to a renderer.

If the text pagination is allowed ( Paginate property is true ) and the text needs pagination (the auto-determined text height is bigger than the available space on page), all the text will be rendered using the necessary height. The text bounds inside the last page and the last page index are returned in the AddTextElementResult object when the element is added to a renderer.

public TextElement(float x, float y, string text, StdFontBaseFamily standardFamily)

Parameters

x float

The start x coordinate where the text will be rendered

y float

The start y coordinate where the text

text string

The text to be rendered

standardFamily StdFontBaseFamily

The text font standard PDF family.

TextElement(float, float, string, byte[])

Constructs a paginable text element that will be rendered at the specified (x,y) position using the specified system font. The height of the rendered text will be auto-determined. The width is the available width in page.

The Unicode text is supported only for embedded true type fonts. A flag indicating if the font is embedded or not in PDF can be specified when the font is added to PDF document.

If the text pagination is not allowed ( Paginate property is false ), the text will be written on current page, the rendered text height being limited by the available height on page. The remaining text and the text bounds inside the current page are returned in the AddTextElementResult object when the element is added to a renderer.

If the text pagination is allowed ( Paginate property is true ) and the text needs pagination (the auto-determined text height is bigger than the available space on page), all the text will be rendered using the necessary height. The text bounds inside the last page and the last page index are returned in the AddTextElementResult object when the element is added to a renderer.

public TextElement(float x, float y, string text, byte[] fontData)

Parameters

x float

The start x coordinate where the text will be rendered

y float

The start y coordinate where the text

text string

The text to be rendered

fontData byte[]

The text font data.

TextElement(float, float, string, Font)

Constructs a paginable text element that will be rendered at the specified (x,y) position using the specified system font. The height of the rendered text will be auto-determined. The width is the available width in page.

The Unicode text is supported only for embedded true type fonts. A flag indicating if the font is embedded or not in PDF can be specified when the font is added to PDF document.

If the text pagination is not allowed ( Paginate property is false ), the text will be written on current page, the rendered text height being limited by the available height on page. The remaining text and the text bounds inside the current page are returned in the AddTextElementResult object when the element is added to a renderer.

If the text pagination is allowed ( Paginate property is true ) and the text needs pagination (the auto-determined text height is bigger than the available space on page), all the text will be rendered using the necessary height. The text bounds inside the last page and the last page index are returned in the AddTextElementResult object when the element is added to a renderer.

public TextElement(float x, float y, string text, Font font)

Parameters

x float

The start x coordinate where the text will be rendered

y float

The start y coordinate where the text

text string

The text to be rendered

font Font

The text font as a System.Drawing.Font object.

TextElement(float, float, string, string)

Constructs a paginable text element that will be rendered at the specified (x,y) position using the specified system font. The height of the rendered text will be auto-determined. The width is the available width in page.

The Unicode text is supported only for embedded true type fonts. A flag indicating if the font is embedded or not in PDF can be specified when the font is added to PDF document.

If the text pagination is not allowed ( Paginate property is false ), the text will be written on current page, the rendered text height being limited by the available height on page. The remaining text and the text bounds inside the current page are returned in the AddTextElementResult object when the element is added to a renderer.

If the text pagination is allowed ( Paginate property is true ) and the text needs pagination (the auto-determined text height is bigger than the available space on page), all the text will be rendered using the necessary height. The text bounds inside the last page and the last page index are returned in the AddTextElementResult object when the element is added to a renderer.

public TextElement(float x, float y, string text, string fontFamily)

Parameters

x float

The start x coordinate where the text will be rendered

y float

The start y coordinate where the text

text string

The text to be rendered

fontFamily string

The text font family name.

Properties

CharacterSpacing

Gets or sets an additional spacing between characters.

public float CharacterSpacing { get; set; }

Property Value

float

EmbedSysFont

A flag indicating if the System.Drawing.Font object associated with this text element should be embedded in the generated PDF document

public bool EmbedSysFont { get; set; }

Property Value

bool

Height

The height of destination rectangle in PDF where this text element will be rendered

public float Height { get; set; }

Property Value

float

LineSpacing

Gets or sets the value that indicates the vertical distance between the baselines of adjacent lines of text.

public float LineSpacing { get; set; }

Property Value

float

Paginate

When true the text can be paginated

public bool Paginate { get; set; }

Property Value

bool

RightToLeftLanguage

Set this property true if the text is in a RTL language.

public bool RightToLeftLanguage { get; set; }

Property Value

bool

Text

The string to be written

public string Text { get; set; }

Property Value

string

TextAlign

Gets or sets the horizontal alignment of the text rendered by this element in PDF

public HorizontalTextAlign TextAlign { get; set; }

Property Value

HorizontalTextAlign

TextAngle

Gets or sets an angle to control text counter-clockwise direction. The default value is 0.

public float TextAngle { get; set; }

Property Value

float

TextFont

Gets or sets the font of the text rendered by this element in PDF

public PdfFont TextFont { get; set; }

Property Value

PdfFont

TextRise

Gets or sets the distance to move the text baseline up or down from its default location. Adjustments to the baseline are useful for drawing superscripts or subscripts. Positive values of text rise move the baseline up and creates a superscript text. Negative values of text rise move the baseline down and creates a subscript text.

public float TextRise { get; set; }

Property Value

float

TextSysFont

Gets or sets the text font as a System.Drawing.Font object

public Font TextSysFont { get; set; }

Property Value

Font

VerticalTextAlign

Gets or sets the vertical alignment of the text rendered by this element in PDF

public VerticalTextAlign VerticalTextAlign { get; set; }

Property Value

VerticalTextAlign

Width

The width of destination rectangle in PDF where this text element will be rendered

public float Width { get; set; }

Property Value

float

WordSpacing

Gets or sets an additional spacing between words. The words separator is consider the space character with code 32

public float WordSpacing { get; set; }

Property Value

float

X

The start X position of this element relative to the PDF elements container

public float X { get; set; }

Property Value

float

Y

The start Y position of this element relative to the PDF elements container

public float Y { get; set; }

Property Value

float