PdfTextElementOnBeforePageRender Property

Optional callback triggered immediately before the text is drawn on each document page, providing the PdfTextPageRenderInfo for that page. The callback receives the geometric area where the text will be drawn together with the substring of text about to be rendered. Use this hook to insert per-page content under the text (custom backgrounds, gradients, side decorations) by drawing on the same page from inside the callback; any drawing performed there is placed in the page content stream before the text glyphs, so the result is layered underneath the text. In the non-rotated path the rectangle is derived from a layout simulation and matches the area used by the post-render callback in normal cases. In the rotated path the rectangle equals the actual used area because the text has already been laid out into an offscreen template at this point

Definition

Namespace: HiQPdf.Next
Assembly: HiQPdf.Next (in HiQPdf.Next.dll) Version: 18.9.2
C#
public Action<PdfTextPageRenderInfo> OnBeforePageRender { get; set; }

Property Value

ActionPdfTextPageRenderInfo

See Also