Click or drag to resize
Pdf Library for .NET

PdfTextElementRenderingResult Class

The result of adding a PdfTextElement to a pdf page or template. Extends PdfRenderingResult with the text that did not fit in the destination bounds.
Inheritance Hierarchy
SystemObject
  SelectPdf.UniversalPdfRenderingResult
    SelectPdf.UniversalPdfTextElementRenderingResult

Namespace: SelectPdf.Universal
Assembly: SelectPdf.Universal (in SelectPdf.Universal.dll) Version: 26.4
Syntax
public class PdfTextElementRenderingResult : PdfRenderingResult

The PdfTextElementRenderingResult type exposes the following members.

Properties
 NameDescription
Public propertyPdfPageLastIndex Gets or sets the zero-based index of the last page where content was rendered.
(Inherited from PdfRenderingResult)
Public propertyPdfPageLastRectangle Gets or sets the bounding rectangle of the content rendered on the last page.
(Inherited from PdfRenderingResult)
Public propertyRemainingText Gets the text that could not be rendered from the initial Text.
Top
Example
PdfDocument document = new PdfDocument();
PdfPage page = document.AddPage();
PdfFont font = PdfFont.CreateStandardFont(PdfStandardFont.Helvetica, 12);
// Bounded height: any text that does not fit is returned as RemainingText.
PdfTextElement text =
    new PdfTextElement(0, 0, 400, 50, "A very long paragraph...", font);
PdfTextElementRenderingResult result =
    (PdfTextElementRenderingResult)page.Add(text);
string overflow = result.RemainingText;
document.Save("out.pdf");
document.Close();
See Also