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 [formEditingEnabled(false)][]:

val builder = PdfActivityConfiguration.Builder(context)
builder.formEditingEnabled(false)
PdfActivityConfiguration.Builder builder = new PdfActivityConfiguration.Builder(context);
builder.formEditingEnabled(false);