Table of Contents

Method FillToFile

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

FillToFile(string, string, PdfFormFillRequest, CancellationToken)

Fills the form of the PDF at inputPath and writes the result to outputPath.

public static PdfFormFillReport FillToFile(string inputPath, string outputPath, PdfFormFillRequest request, CancellationToken cancellationToken = default)

Parameters

inputPath string

File-system path to the source PDF.

outputPath string

Destination path for the filled document.

request PdfFormFillRequest

The values to write and the flatten option.

cancellationToken CancellationToken

Cancellation token.

Returns

PdfFormFillReport

A report of what was written and what was skipped.

Exceptions

ArgumentException

Thrown when a path is null or whitespace.

ArgumentNullException

Thrown when request is null.

FileNotFoundException

Thrown when inputPath does not exist.

PdfDocumentException

Thrown when the source cannot be parsed or is password protected.

Share