Method AddTextOverlaysToFile
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
inputPathstringPath to the source PDF file.
overlaysIEnumerable<PageTextOverlay>A collection of PageTextOverlay entries, each associating a page index with its text layout.
outputPathstringPath where the modified PDF will be written.
saveOptionsPdfSaveOptionsOptions controlling how the modified PDF is written. Default: full rewrite.
Exceptions
- ArgumentNullException
inputPath,overlays, oroutputPathisnull.- FileNotFoundException
The file specified by
inputPathdoes not exist.