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
| Name | Type | Access | Description |
|---|---|---|---|
InputFileName | string? | Read/Write | Path to the template PDF (set this OR call BindPdf(string)). |
OutputFileName | string? | Read/Write | Path where Save() writes the merged result. |
InputStream | Stream? | Read/Write | Stream form of InputFileName — when set, used in preference to the file path. |
OutputStream | Stream? | Read/Write | Stream form of OutputFileName — when set, Save() writes here. |
GeneratingPath | string? | Read/Write | Directory used for per-row PDF generation when batch-saving by row to separate files. |
BasicFileName | string? | Read/Write | Base name used for per-row PDF generation in batch mode. |
UnFlattenFields | string[] | Read/Write | Field names to leave editable (i.e. |
OutputStreams | Stream[]? | Read/Write | Output streams used by batch-mode save (per-row). |
Methods
| Signature | Description |
|---|---|
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. |