Skip to content
ComPDF
DemoSampleAPI ReferenceFAQ
New Release

Open-Source PDF SDK & AI Document Processing

Get the full self-hosted SDK and AI document processing on GitHub. One-click deploy to quickly build your document workflows.

Edit Form Fields

Retrieve and edit the appearance and content of form fields.

Note that the properties of different form field types may not be entirely consistent.

The steps to edit a form field are as follows:

  1. Obtain the form object to be edited.

  2. Modify the form properties.

  3. Update the form appearance.

This example shows how to edit form fields:

C#
CPDFTextWidget textWidget = myCPDFWidget as CPDFTextWidget;
textWidget.SetWidgetBorderRGBColor(new byte[] {255, 0, 0});
textWidget.UpdateFormAp();