agentic-net-examples / facades-forms
AGENTS.md2 starsChanged 4 months agoMITView on GitHub
C# examples for facades-forms using Aspose.PDF for .NET
Where files are headingNew AGENTS.md files have more rules about keeping secrets out of the code, and fewer about checking a change actually works.
Of the AGENTS.md files we read, the 11,773 first seen in the last six months, against the older ones: the kind of rule that gained most share, and the kind that lost most. About files like this in general, not this one, and an estimate, since a kind is a pattern in the words.
In this repository36 other files it gives its agents.
- accessibility-and-tagged-pdfsAGENTS.md
- aspose-pdf-examplesAGENTS.md
- basic-operationsAGENTS.md
- compare-pdfAGENTS.md
- conversionAGENTS.md
- documentAGENTS.md
- facades-acroformsAGENTS.md
- facades-annotationsAGENTS.md
- facades-bookmarksAGENTS.md
- facades-convert-documentsAGENTS.md
- facades-documentsAGENTS.md
- facades-edit-documentAGENTS.md
- facades-extract-images-and-textAGENTS.md
- facades-fill-formsAGENTS.md
- facades-metadataAGENTS.md
- facades-pagesAGENTS.md
- facades-secure-documentsAGENTS.md
- facades-sign-documentsAGENTS.md
- facades-stampsAGENTS.md
- facades-texts-and-imagesAGENTS.md
- facades-xmp-metadataAGENTS.md
- graphs-zugferd-operatorsAGENTS.md
- pagesAGENTS.md
- parse-pdfAGENTS.md
- securing-and-signing-pdfAGENTS.md
- stampingAGENTS.md
- uncategorizedAGENTS.md
- working-with-annotationsAGENTS.md
- working-with-attachmentsAGENTS.md
- working-with-formsAGENTS.md
- working-with-graphsAGENTS.md
- working-with-imagesAGENTS.md
- working-with-tablesAGENTS.md
- working-with-textAGENTS.md
- working-with-xmlAGENTS.md
- .github/copilot-instructions.mdCopilot instructions
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
- Distinctive: line 114
Use Form.BindPdf({input_pdf}) to open a PDF document for form manipulation.
≈ “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.
Files
AGENTS - facades-forms
Facades forms in PDF using C# / .NET -- 86 verified, compile-tested examples for Aspose.PDF for .NET 26.8.0. Each
.csfile 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-forms category. This folder contains standalone C# examples for facades-forms operations. See the root agents.md for repository-wide conventions and boundaries.
Scope
- This folder contains examples for facades-forms.
- Files are standalone
.csexamples stored directly in this folder.
Required Namespaces
using Aspose.Pdf.Facades;(81/86 files) ← category-specificusing Aspose.Pdf;(52/86 files) ← category-specificusing Aspose.Pdf.Forms;(27/86 files)using Aspose.Pdf.Annotations;(7/86 files)using Aspose.Pdf.Text;(1/86 files)using System;(86/86 files)using System.IO;(79/86 files)using System.Collections.Generic;(8/86 files)using System.Drawing;(4/86 files)using System.Text.Json;(3/86 files)using System.Linq;(2/86 files)using System.Security.Cryptography;(1/86 files)using System.Text;(1/86 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
| File | Title | Key APIs | Description |
| add-confirmation-dialog-to-pdf-submit-button | Add Confirmation Dialog to PDF Submit Button | FormEditor, BindPdf, AddFieldScript | Shows how to use Aspose.Pdf.Facades.FormEditor to attach JavaScript that displays a confirmation ... |
| add-digital-signature-field-and-sign-pdf | Add Digital Signature Field and Sign PDF | Document, FormEditor, PdfFileSignature | Shows how to add a visible signature field to a PDF page and apply a digital signature using Aspo... |
| add-email-validation-javascript-to-pdf-form-field | Add Email Validation JavaScript to PDF Form Field | FormEditor, BindPdf, Save | Demonstrates how to attach a JavaScript action to the "Email" form field that validates the email... |
| add-email-validation-to-pdf-form-field | Add Email Validation to PDF Form Field | Document, FormEditor, SetFieldScript | Demonstrates how to attach JavaScript to a PDF form field using Aspose.Pdf to validate email addr... |
| add-form-load-javascript-to-pdf | Add Form Load JavaScript to PDF | PdfContentEditor, BindPdf, AddDocumentAdditionalAction | Demonstrates how to attach a document‑level JavaScript action that populates a form field named "... |
| add-gender-radio-button-group | Add Gender Radio Button Group to PDF Form | FormEditor, BindPdf, AddField | Shows how to insert a radio button group named "Gender" with options Male, Female, and Other, and... |
| add-hidden-authtoken-field-to-pdf | Add Hidden AuthToken Field to PDF | Document, TextBoxField, Rectangle | Generates a secure random token, creates a zero‑size hidden TextBoxField named AuthToken, adds it... |
| add-hidden-version-field-to-pdf | Add Hidden Version Field to PDF | Document, FormEditor, BindPdf | Shows how to insert a hidden numeric field named "Version" with a value of 2 into a PDF using Asp... |
| add-javascript-alert-to-push-button | Add JavaScript Alert to Push Button in PDF | Document, Page, Rectangle | Shows how to create a PDF with a push‑button field and attach a JavaScript alert that displays wh... |
| add-list-box-field-to-pdf-form | Add List Box Field to PDF Form | FormEditor, BindPdf, AddField | Demonstrates how to create a ListBox form field in a PDF, populate it with items, set a default v... |
| add-list-item-to-pdf-dropdown | Add List Item to PDF Dropdown Field | FormEditor, AddListItem, Save | Shows how to add a new option to a combo box (dropdown) form field in a PDF using Aspose.Pdf.Faca... |
| add-print-button-to-pdf | Add Print Button to PDF Using Aspose.Pdf | FormEditor, BindPdf, AddField | Shows how to insert a push‑button form field that triggers the PDF print dialog via JavaScript in... |
| add-radio-button-group-to-pdf-form | Add Radio Button Group to PDF Form | FormEditor, AddField, Save | Shows how to create a radio button group named "PaymentMethod" with options "Credit" and "PayPal"... |
| add-reset-form-button-to-pdf | Add Reset Form Button to PDF | Document, FormEditor, AddField | Demonstrates how to insert a push button into a PDF that clears all form fields when clicked, usi... |
| add-state-combobox-to-pdf | Add State Combo Box to PDF Form | FormEditor, FieldType, AddField | Shows how to insert a combo box field named "State" into an existing PDF and fill it with US stat... |
| add-submit-button-to-pdf-form | Add Submit Button to PDF Form | FormEditor, AddSubmitBtn, Save | Shows how to insert a submit button on page 1 of a PDF form that posts the form data to a specifi... |
| add-text-field-to-pdf-page | Add Text Field to PDF Page | FormEditor, BindPdf, AddField | Shows how to insert a text form field named "CustomerName" on page 1 of an existing PDF using Asp... |
| add-unchecked-checkbox-field-to-pdf | Add Unchecked Checkbox Field to PDF Page | Document, FormEditor, AddField | Demonstrates how to insert a checkbox form field on a specific PDF page and set its default state... |
| apply-custom-font-to-pdf-form-text-fields | Apply Custom Font to All PDF Form Text Fields | FormEditor, FormFieldFacade, FieldType | Demonstrates how to set a custom font (e.g., Arial Bold) for every text field in a PDF form using... |
| apply-default-decoration-to-text-fields | Apply Default Decoration to All Text Form Fields | FormEditor, FormFieldFacade, FieldType | Shows how to set default visual attributes via FormFieldFacade and apply them to every text field... |
| apply-phone-number-input-mask | Apply Phone Number Input Mask to PDF Form Field | FormEditor, SetFieldScript, Save | Demonstrates how to attach JavaScript to a PDF form field using Aspose.Pdf to enforce a phone num... |
| attach-javascript-clear-discountcode-field | Clear PDF Form Field on Focus with JavaScript | Document, Field, JavascriptAction | Demonstrates how to attach a JavaScript action to a PDF form field using Aspose.Pdf so that the f... |
| attach-javascript-to-pdf-form-field | Attach JavaScript to PDF Form Field for Auto-Calculating Tot... | Document, Form, FormField | Shows how to load a PDF, retrieve the Quantity and TotalPrice form fields, attach a JavaScript On... |
| attach-javascript-validation-to-pdf-form-field | Attach JavaScript Validation to PDF Form Field | FormEditor, BindPdf, SetFieldScript | Shows how to bind a PDF, add a JavaScript script to the "Age" form field that displays a warning ... |
| attach-js-resetform-clear-hidden-fields | Attach JavaScript to ResetForm Button to Clear Hidden Fields | FormEditor, BindPdf, AddFieldScript | Shows how to bind a PDF with Aspose.Pdf.Facades.FormEditor, add JavaScript to a ResetForm button ... |
| attach-js-validation-to-pdf-submit-button | Attach JavaScript Validation to PDF Submit Button | FormEditor, BindPdf, AddFieldScript | Shows how to use Aspose.Pdf.Facades.FormEditor to add a JavaScript script to a PDF submit button ... |
| batch-add-selectall-checkbox-to-pdf | Batch Add SelectAll Checkbox to First Page of PDFs | FormEditor, BindPdf, AddField | Shows how to process multiple PDF files in a directory and use Aspose.Pdf.Facades.FormEditor to a... |
| batch-rename-pdf-form-fields | Batch Rename PDF Form Fields | Form, FormEditor, RenameField | Demonstrates how to rename all form fields in a PDF that start with a specific prefix using Aspos... |
| batch-update-submit-button-urls | Batch Update Submit Button URLs in PDFs | Form, FormEditor, FormSubmitButtonNames | Demonstrates how to iterate through a folder of PDF files, detect submit buttons in each form, an... |
| clear-and-populate-list-box-field | Clear and Populate List Box Field in PDF | Document, ListBoxField, Options | Demonstrates how to remove all existing options from a PDF list box (combo) field and then add ne... |
| ... | and 56 more files |
Category Statistics
- Total examples: 86
Category-Specific Tips
Key API Surface
Aspose.Pdf.Facades.FieldTypeAspose.Pdf.Facades.FormAspose.Pdf.Facades.Form.BindPdfAspose.Pdf.Facades.Form.BindPdf(string)Aspose.Pdf.Facades.Form.ExportFdfAspose.Pdf.Facades.Form.FillField(string, string)Aspose.Pdf.Facades.Form.GetField(string)Aspose.Pdf.Facades.Form.ImportFdfAspose.Pdf.Facades.Form.SaveAspose.Pdf.Facades.Form.Save(string)Aspose.Pdf.Facades.FormEditorAspose.Pdf.Facades.FormEditor.BindPdfAspose.Pdf.Facades.FormEditor.CopyOuterFieldAspose.Pdf.Facades.FormEditor.SaveAspose.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-forms patterns
<!-- AUTOGENERATED:START -->Updated: 2026-08-20 | Run: 20260820_001147_12d7b3
<!-- AUTOGENERATED:END -->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
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.

