agentleFS
aspose-pdfaspose-pdf/agentic-net-examples/facades-fill-forms/AGENTS.md

agentic-net-examples / facades-fill-forms

AGENTS.md2 starsChanged 4 months agoMITView on GitHub

C# examples for facades-fill-forms using Aspose.PDF for .NET

The file

We split this AGENTS.md into the rules it gives an agent

1 rule. About 0 are common, 1 is distinctive, and 0 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈1

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 0

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Use Form.BindPdf({input_pdf}) to open a PDF document for form manipulation.

    line 117

≈ “Common” is an estimate: at least 1 in 5 of the 16,595 AGENTS.md files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
AGENTS.md

AGENTS - facades-fill-forms

Facades fill forms in PDF using C# / .NET -- 33 verified, compile-tested examples for Aspose.PDF for .NET 26.8.0. Each .cs file is a standalone, build-validated console example, generated and runtime-checked by an AI agent before publishing.

Persona

You are a C# developer specializing in PDF processing using Aspose.PDF for .NET, working within the facades-fill-forms category. This folder contains standalone C# examples for facades-fill-forms operations. See the root agents.md for repository-wide conventions and boundaries.

Scope

  • This folder contains examples for facades-fill-forms.
  • Files are standalone .cs examples stored directly in this folder.

Required Namespaces

  • using Aspose.Pdf.Facades; (31/33 files) ← category-specific
  • using Aspose.Pdf; (22/33 files) ← category-specific
  • using Aspose.Pdf.Forms; (12/33 files)
  • using Aspose.Pdf.Annotations; (6/33 files)
  • using Aspose.Pdf.Text; (5/33 files)
  • using Aspose.Pdf.Drawing; (1/33 files)
  • using System; (33/33 files)
  • using System.IO; (30/33 files)
  • using System.Data; (25/33 files) ← category-specific
  • using System.Collections.Generic; (5/33 files)
  • using System.Threading; (3/33 files)
  • using System.Text; (2/33 files)
  • using System.Drawing; (1/33 files)
  • using System.Linq; (1/33 files)
  • using System.Text.Json; (1/33 files)
  • using System.Threading.Tasks; (1/33 files)

Common Code Pattern

Most files follow this pattern:

using (Document doc = new Document("input.pdf"))
{
    // ... operations ...
    doc.Save("output.pdf");
}

Files in this folder

FileTitleKey APIsDescription
add-date-header-to-pdf-pagesAdd Date Header to PDF Pages Using AutoFillerAutoFiller, PdfFileStamp, FormattedTextShows how to create a PDF template, fill it with data via AutoFiller, and then prepend a header c...
apply-password-protection-to-filled-pdfApply Password Protection to a Filled PDFDocument, PdfFileSecurity, EncryptFileShows how to load a filled PDF, save a temporary copy, and encrypt it with user and owner passwor...
async-fill-pdf-form-from-data-tableAsynchronously Fill PDF Form from DataTable using Aspose Aut...Document, Page, TextBoxFieldDemonstrates creating a simple PDF template, building a DataTable, and using Aspose.Pdf.Facades.A...
batch-fill-pdf-forms-from-large-csvBatch Fill PDF Forms from Large CSV using AutoFillerAutoFiller, BindPdf, ImportDataTableThe example streams rows from a large CSV (simulating an XLSX) in batches, builds a DataTable for...
batch-fill-pdf-template-with-multiple-datatablesBatch Fill PDF Template with Multiple DataTablesAutoFiller, BindPdf, GeneratingPathShows how to use Aspose.Pdf's AutoFiller to fill a PDF form repeatedly for each DataTable in a li...
bind-pdf-form-to-autofillerBind PDF Form to AutoFillerAutoFiller, BindPdfDemonstrates how to create an AutoFiller instance, bind it to a PDF form file, and prepare it for...
convert-in-memory-pdf-to-byte-arrayConvert In-Memory PDF to Byte ArrayDocument, Page, TextFragmentCreates a PDF document entirely in memory with Aspose.Pdf, saves it to a MemoryStream, and return...
convert-large-pdf-to-excel-with-temp-folderConvert Large PDF to Excel Using a Temporary FolderPdfFileEditor, Document, PdfSaveOptionsDemonstrates how to convert a large PDF to Excel while using a temporary directory and disk buffe...
extract-pdf-pages-with-custom-namesExtract PDF Pages with Custom File Names from DataTableDocument, PdfFileEditor, ExtractDemonstrates using Aspose.Pdf.Facades.PdfFileEditor to extract specific pages from a PDF and save...
fill-pdf-form-field-preserve-layoutFill PDF Form Field and Preserve LayoutForm, FillField, SaveDemonstrates how to load a PDF with form fields, fill a specific field using the Aspose.Pdf.Facad...
fill-pdf-form-from-csv-with-mappingFill PDF Form Fields from CSV Using Mapping ConfigurationForm, BindPdf, FillFieldDemonstrates how to read a CSV file, map its column names to PDF form field names via a JSON conf...
fill-pdf-form-from-csv-xlsxFill PDF Form from CSV/XLSX Using AutoFillerAutoFiller, BindPdf, ImportDataTableShows how to read CSV (or CSV‑exported XLSX) data into a DataTable and use Aspose.Pdf.Facades.Aut...
fill-pdf-form-from-csvFill PDF Form from CSV Data using Aspose.PdfForm, ctor, FillFieldDemonstrates loading data from a CSV file into a DataTable and using Aspose.Pdf.Facades.Form to f...
fill-pdf-form-from-memory-streamFill PDF Form from Memory Stream using AutoFillerDocument, AutoFiller, TextBoxFieldCreates a PDF form template in memory and fills it with data from a DataTable using Aspose.Pdf.Fa...
fill-pdf-form-from-multiple-csv-worksheetsFill PDF Form from Multiple CSV Worksheets using AutoFillerAutoFiller, BindPdf, ImportDataTableThe example reads each CSV file as a worksheet, creates a DataTable, and uses Aspose.Pdf.Facades....
fill-pdf-form-using-autofiller-datatableFill PDF Form Using AutoFiller and DataTableDocument, Page, TextBoxFieldDemonstrates how to create a PDF template with AcroForm fields, populate a DataTable, and use Asp...
fill-pdf-form-verify-sizeFill PDF Form and Verify Output SizeAutoFiller, BindPdf, ImportDataTableDemonstrates using Aspose.Pdf.AutoFiller to populate a PDF form from a DataTable, creates a templ...
fill-pdf-form-with-autofiller-exception-handlingFill PDF Form Using AutoFiller with Exception HandlingAutoFiller, BindPdf, ImportDataTableDemonstrates binding a PDF template, importing data from a DataTable, and generating a filled PDF...
fill-pdf-form-with-autofillerFill PDF Form Using AutoFiller with Custom DataTable ColumnsAutoFiller, BindPdf, ImportDataTableDemonstrates how to create a DataTable, add required and custom columns, and use Aspose.Pdf.Facad...
fill-pdf-form-with-autofiller__v2Fill PDF Form Using AutoFiller and Dispose ResourcesAutoFiller, Document, PageDemonstrates creating a PDF form template, populating it from a DataTable with AutoFiller, and pr...
fill-pdf-form-with-timeoutFill PDF Form with Timeout CancellationForm, BindPdf, FillFieldShows how to fill a PDF form field using Aspose.Pdf's Form facade and abort the operation if it e...
format-numeric-datatable-values-fill-pdf-formFormat Numeric DataTable Values and Fill PDF Form FieldsDocument, Page, RectangleShows how to format numeric values from a DataTable (e.g., currency) as strings and populate them...
import-datatable-into-pdf-form-with-readonly-uniqu...Import DataTable with ReadOnly and Unique Columns into PDF F...Document, Page, TextBoxFieldDemonstrates how to configure DataColumn properties such as ReadOnly and Unique, create matching ...
load-csv-to-datatable-formdata-converterLoad CSV into DataTable and Use FormDataConverter for PDF Fo...FormDataConverterShows how to read a CSV (as a replacement for an XLSX) into a DataTable and assign it to Aspose.P...
log-datatable-row-processing-pdf-page-creationLog DataTable Row Processing and PDF Page CreationDocument, Page, TextBoxFieldDemonstrates creating a PDF template with form fields, filling it using AutoFiller from a DataTab...
map-datatable-columns-to-pdf-form-fieldsMap DataTable Columns to PDF Form Fields with AutoFillerDocument, Page, TextBoxFieldDemonstrates renaming DataTable columns to match PDF form field identifiers and filling the PDF u...
merge-filled-pdfs-from-datatablesMerge Multiple Filled PDFs from DataTables into a Single PDFAutoFiller, BindPdf, ImportDataTableThe example creates a PDF form template from a DataTable, fills separate PDFs for each DataTable ...
pdf-one-page-per-datarowCreate PDF with One Page per DataTable RowDocument, Page, TableShows how to generate a PDF where each row of a DataTable is placed on a separate page using Aspo...
pdf-page-identifier-summary-reportGenerate PDF Page‑to‑Identifier Summary ReportDocument, Page, TableAbsorberThe example opens a PDF, extracts a table identifier from each page using TableAbsorber, falls ba...
retry-autofiller-import-transient-errorsRetry AutoFiller Import with Transient File Access HandlingAutoFiller, BindPdf, ImportDataTableDemonstrates using Aspose.Pdf's AutoFiller within a retry loop to handle transient I/O and access...
...and 3 more files

Category Statistics

  • Total examples: 33

Category-Specific Tips

Key API Surface

  • Aspose.Pdf.Facades.FieldType
  • Aspose.Pdf.Facades.Form
  • Aspose.Pdf.Facades.Form.BindPdf
  • Aspose.Pdf.Facades.Form.BindPdf(string)
  • Aspose.Pdf.Facades.Form.ExportFdf
  • Aspose.Pdf.Facades.Form.FillField(string, string)
  • Aspose.Pdf.Facades.Form.GetField(string)
  • Aspose.Pdf.Facades.Form.ImportFdf
  • Aspose.Pdf.Facades.Form.Save
  • Aspose.Pdf.Facades.Form.Save(string)
  • Aspose.Pdf.Facades.FormEditor
  • Aspose.Pdf.Facades.FormEditor.BindPdf
  • Aspose.Pdf.Facades.FormEditor.CopyOuterField
  • Aspose.Pdf.Facades.FormEditor.Save
  • Aspose.Pdf.Facades.FormFieldFacade

Rules

  • Bind a PDF file to a Form facade with Form.BindPdf({input_pdf}).
  • Flatten every form field in the bound document by calling Form.FlattenAllFields().
  • Persist the flattened document using Form.Save({output_pdf}).
  • Use Form.BindPdf({input_pdf}) to open a PDF document for form manipulation.
  • Open an FDF file as a stream and call Form.ImportFdf({fdf_stream}) to populate the PDF form fields.

Warnings

  • The Form class belongs to the Aspose.Pdf.Facades namespace, which may be deprecated in future releases; consider using the newer Document/FormField APIs.
  • The example manually manages the FileStream; ensure the stream is closed or disposed to avoid resource leaks.
  • The example assumes the target PDF already contains an AcroForm; otherwise AddField may have no effect.
  • Coordinate values are in points; callers must convert from other units if needed.
  • FormFieldFacade.Alignment expects one of the FormFieldFacade alignment constants (e.g., AlignCenter).

General Tips

  • See parent AGENTS.md for:
    • Boundaries -- Always / Ask First / Never rules for all examples
    • Common Mistakes -- verified anti-patterns that cause build failures
    • Domain Knowledge -- cross-cutting API-specific gotchas
    • Testing Guide -- build and run verification steps
  • Review code examples in this folder for facades-fill-forms patterns
<!-- AUTOGENERATED:START -->

Updated: 2026-08-20 | Run: 20260820_001147_12d7b3

<!-- AUTOGENERATED:END -->

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.