On this page
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:
Obtain the page object from CPDFDocument where you want to delete the form field.
Delete the form field.
This example shows how to delete form fields:
java
CPDFDocument document = new CPDFDocument(context);
document.open(pdfPath);
CPDFPage page = document.pageAtIndex(0);
List<CPDFAnnotation> annotationList = page.getAnnotations();
annotationList.remove(0);
kotlin
val document = new CPDFDocument(context)
document.open(pdfPath)
val page = document.pageAtIndex(0)
val annotationList = page.getAnnotations()
annotationList.removeAt(0)