Hello,
iam trying to create a read only pdf viewer and the basic stuff is pretty easy (hide toolbar items and so on).
But now iam trying to set all form fields to readonly.
Cause we are loading out document over an ajax service not all form fields are present if i only load first page (please correct me if iam wrong). Ive subscribe to the ajaxRequestSuccess event and tried to set all form fields to isReadonly = true.
this.pdfViewer.enableFormFields = !this.readOnly;
this.pdfViewer.formFieldCollection.forEach((f) => {
f.isReadonly = this.readOnly;
f.properties.isReadonly = this.readOnly;
});
this.pdfViewer.dataBind();
this.pdfViewer.refresh();
But i can still add a signature to the signature field. If i scroll now few pages down and back up the field is now readonly.
Is there a better way?