Table of Contents

Method AddTextOverlaysToFile

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

AddTextOverlaysToFile(string, IEnumerable<PageTextOverlay>, string, PdfSaveOptions)

Adds invisible text overlays to multiple pages of a PDF file in a single operation using precomputed PageElement instances. No OCR is performed.

public static void AddTextOverlaysToFile(string inputPath, IEnumerable<PageTextOverlay> overlays, string outputPath, PdfSaveOptions saveOptions = PdfSaveOptions.None)

Parameters

inputPath string

Path to the source PDF file.

overlays IEnumerable<PageTextOverlay>

A collection of PageTextOverlay entries, each associating a page index with its text layout.

outputPath string

Path where the modified PDF will be written.

saveOptions PdfSaveOptions

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

Exceptions

ArgumentNullException

inputPath, overlays, or outputPath is null.

FileNotFoundException

The file specified by inputPath does not exist.

Share