TextElement(Single, Single, Single, Single, String, StdFontBaseFamily, Single, PdfColor) Constructor

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.

Definition

Namespace: Winnovative
Assembly: WnvHtmlToPdf_NetCore (in WnvHtmlToPdf_NetCore.dll) Version: 18.0.0
C#
public TextElement(
	float x,
	float y,
	float width,
	float height,
	string text,
	StdFontBaseFamily standardFamily,
	float fontSizePoints,
	PdfColor textColor
)

Parameters

x  Single
The start x coordinate where the text will be rendered
y  Single
The start y coordinate where the text
width  Single
The width of the destination rectangle. Use a negative value allow text to flow freely in PDF page width.
height  Single
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  Single
The text font size in points
textColor  PdfColor
The text color

See Also