AutoFiller

Overview

AutoFiller is a class in Aspose.PDF FOSS for .NET. Inherits from: ISaveableFacade, IDisposable.

Repeatedly stamps a template PDF with rows from a DataTable: for each row, fills the form fields whose names match column names, flattens (except those listed in UnFlattenFields), and appends the resulting pages to the output.

This class provides 10 methods for working with AutoFiller objects in .NET programs. Available methods include: AutoFiller, BindPdf, Close, Dispose, ImportDataTable, Save. All public members are accessible to any .NET application after installing the Aspose.PDF FOSS for .NET package. Properties: BasicFileName, GeneratingPath, InputFileName, InputStream, OutputFileName, OutputStream, and 2 more.

Properties

NameTypeAccessDescription
InputFileNamestring?Read/WritePath to the template PDF (set this OR call BindPdf(string)).
OutputFileNamestring?Read/WritePath where Save() writes the merged result.
InputStreamStream?Read/WriteStream form of InputFileName — when set, used in preference to the file path.
OutputStreamStream?Read/WriteStream form of OutputFileName — when set, Save() writes here.
GeneratingPathstring?Read/WriteDirectory used for per-row PDF generation when batch-saving by row to separate files.
BasicFileNamestring?Read/WriteBase name used for per-row PDF generation in batch mode.
UnFlattenFieldsstring[]Read/WriteField names to leave editable (i.e.
OutputStreamsStream[]?Read/WriteOutput streams used by batch-mode save (per-row).

Methods

SignatureDescription
AutoFiller()Create an unbound AutoFiller.
BindPdf(srcDoc: Document)Calls BindPdf on this AutoFiller instance.
BindPdf(srcFile: string)
BindPdf(srcStream: Stream)
ImportDataTable(dataTable: DataTable)For each row in table, clone the template, set form-field values from row[columnName], flatten (except UnFlattenFields), and append the cloned pages to the output document.
Save()Save the merged output.
Save(destFile: string)Calls Save on this AutoFiller instance.
Save(destStream: Stream)
Close()Calls Close on this AutoFiller instance.
Dispose()Calls Dispose on this AutoFiller instance.

See Also