Disable PDF Form Editing on Android

You can disable the modification of a specific form field by using setFlags with the READONLY flag, like so:

// Make the annotation read-only.
annotation.setFlags(EnumSet.of(AnnotationFlags.READONLY))
// Make the annotation read-only.
annotation.setFlags(EnumSet.of(AnnotationFlags.READONLY));

For more information, see the Annotation Flags guide.

Disabling All Form Interactions

You can disable all form interactions and modifications using disableFormEditing:

val builder = PdfActivityConfiguration.Builder(context)
builder.disableFormEditing()
PdfActivityConfiguration.Builder builder = new PdfActivityConfiguration.Builder(context);
builder.disableFormEditing();