WebViewer Version: 11.10.0
Do you have an issue with a specific file(s)? No, this happens with any PDF that has form fields (text fields and signature fields created via WebViewer’s form field creation tools).
Can you reproduce using one of our samples or online demos? Not directly, as it requires multi-party field assignment via custom data, but the core issue — field.flags.ReadOnly = true and annot.ReadOnly = true / annot.setReadOnly(true) not preventing user interaction with WidgetAnnotation (text input and signature widgets)
Are you using the WebViewer server? No
Does the issue only happen on certain browsers? No
Is your issue related to a front-end framework? Next.js 14 (React), but the issue is with the WebViewer Core API, not the framework.
Is your issue related to annotations? Yes — specifically WidgetAnnotation (form field widgets, including TextWidgetAnnotation and SignatureWidgetAnnotation).
Please give a brief summary of your issue:
field.flags.ReadOnly = true and annot.setReadOnly(true) On WidgetAnnotations, do not prevent the user from typing in text fields or clicking signature fields in WebViewer 11.10.0
Please describe your issue and provide steps to reproduce it:
I am working on a feature in which I want certain fields to be read-only when the document is opened.
After the document loads and XFDF annotations are imported, we iterate through all WidgetAnnotation instances and apply read-only restrictions to non-editable fields using the following approach:
// For each widget annotation that should be read-only:
const field = annot.getField();
// Method 1: Field flag
if (field?.flags) {
field.flags.ReadOnly = true;
}
// Method 2: Annotation ReadOnly property
annot.ReadOnly = true;
// Method 3: setReadOnly API (if available)
if (typeof annot.setReadOnly === 'function') {
annot.setReadOnly(true);
}
// Method 4: Lock flags
annot.NoMove = true;
annot.NoResize = true;
annot.NoDelete = true;
Please provide a link to a minimal sample where the issue is reproducible: NA (Internal code)