Method FillToFile
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
inputPathstringFile-system path to the source PDF.
outputPathstringDestination path for the filled document.
requestPdfFormFillRequestThe values to write and the flatten option.
cancellationTokenCancellationTokenCancellation 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
requestis null.- FileNotFoundException
Thrown when
inputPathdoes not exist.- PdfDocumentException
Thrown when the source cannot be parsed or is password protected.