WebViewer Version: 8.10.0
Do you have an issue with a specific file(s)? No
Can you reproduce using one of our samples or online demos? Yes
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? No
Is your issue related to annotations? Yes
Please give a brief summary of your issue:
Signature action is lost when hiding signature field, even if i it is set to visible later.
Please describe your issue and provide steps to reproduce it:
We have PDFs with signatures. Some of thes signatures have the “When Signed”-Action set to “Mark as Read-Only” for all fields:
Under specific circumstances we are hiding these fields in the WebViewer. After downloading the PDF, the “When Signed”-Action is missing in the Signature field:
Reproducing is easy with this code:
WebViewer(
{
path: "../lib",
initialDoc: "../files/test.pdf",
fullAPI: true,
},
this.viewer.nativeElement
).then((instance) => {
this.wvInstance = instance;
const { documentViewer, Annotations, annotationManager } = instance.Core;
documentViewer.on("annotationsLoaded", () => {
annotationManager.getAnnotationsList().forEach((annot) => {
if (
annot instanceof instance.Core.Annotations.SignatureWidgetAnnotation
) {
annot.Hidden = true;
annot.Hidden = false;
}
});
});
});
I also found out, that if i check the field if it is really a signature field, there is a second property hidden
instead of Hidden
. If i use the lowercase property, it works as expected (but i have to explicitly unhide the field, that it works).
I don’t know if this is expected behavior, but in my opinion, the “When Signed”-Action should not be changed when hiding or unhiding the field.