Click or drag to resize

TextElement Constructor (Single, Single, Single, 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 font can be embedded in the generated PDF document if the embedFont parameter of Document.Fonts.Add(System.Drawing.Font font, bool embedFont) is 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 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.

Namespace:  ExpertPdf.HtmlToPdf.PdfDocument
Assembly:  ephtmltopdf (in ephtmltopdf.dll) Version: 17.0.0
Syntax
public TextElement(
	float x,
	float y,
	float width,
	string text,
	PdfFont font,
	PdfColor textColor
)

Parameters

x
Type: SystemSingle
The start x coordinate where the text will be rendered
y
Type: SystemSingle
The start y coordinate where the text
width
Type: SystemSingle
The width of the destination rectangle
text
Type: SystemString
The text to be rendered
font
Type: ExpertPdf.HtmlToPdf.PdfDocumentPdfFont
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
Type: ExpertPdf.HtmlToPdf.PdfDocumentPdfColor
The text color
See Also