Table of Contents

Method AddTextOverlay

Namespace
LMKit.Document.Pdf
Assembly
LM-Kit.NET.dll

AddTextOverlay(Attachment, int, PageElement, PdfSaveOptions)

Adds an invisible text overlay to a single page of a PDF attachment using a precomputed PageElement. No OCR is performed.

public static Attachment AddTextOverlay(Attachment source, int pageIndex, PageElement pageElement, PdfSaveOptions saveOptions = PdfSaveOptions.None)

Parameters

source Attachment

The source PDF attachment to modify.

pageIndex int

Zero-based index of the target page.

pageElement PageElement

The page layout containing text elements and their bounding boxes.

saveOptions PdfSaveOptions

Options controlling how the modified PDF is written. Default: full rewrite.

Returns

Attachment

A new Attachment containing the modified PDF.

Exceptions

ArgumentNullException

source or pageElement is null.

Share