Skip to content
Guides

Delete Form Fields

Since the form fields class inherits from the annotation class, the way to delete form fields is the same as delete annotations.

The steps to delete form fields are as follows:

  1. Obtain the page object from CPDFDocument where you want to delete the form field.

  2. Delete the form field.

This example shows how to delete form fields:

C#
CPDFDocument document = CPDFDocument.InitWithFilePath("filePath");
CPDFPage page = document.PageAtIndex(0);

List<CPDFAnnotation>annotList = page.GetAnnotations();
annotList[0].RemoveAnnot();