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 declares 10 methods for AutoFiller objects in .NET programs. Available methods include: AutoFiller, BindPdf, Close, Dispose, ImportDataTable, Save. 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)Uses an already opened document as the template.
BindPdf(srcFile: string)Opens the PDF file at the given path and uses it as the template.
BindPdf(srcStream: Stream)Reads the whole stream (from the start when it is seekable) and uses that PDF as the template.
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)Saves the merged output document to the given file path.
Save(destStream: Stream)Saves the merged output document to the given stream.
Close()Releases the template and the output document; same as Dispose.
Dispose()Calls Dispose on this AutoFiller instance.

See Also

 English