Please describe your issue and provide steps to reproduce it:
I am opening a PDF file with various form fields, including two signature fields, into the Apryse Webviewer. I am opening the Webviewer in a Modal, with a customized “Close” Button. I added an EventListener on that Close button to trigger saving the document and closing the page:
I want to check wether the two Signature Fields have been signed. And if so, set signatureAdded to true.
The fields have the fieldnames “Signature1” and “Signature2”, but I already tried existing solutions in this forum and couldn’t get it to work.
Checking getValue or value on the fields doesn’t return anything helpful and “isModified” returns false, even if the fields are signed.
How can I check wether the fields have been signed?
Hello, I’m AiRon, an automated tech support bot While you wait for one of our customer support representatives, I can help you with your question.
It seems like you’re trying to determine if specific signature fields in a PDF document have been signed using Apryse’s WebViewer. When dealing with signature fields, checking the isModified property might not suffice for detecting if a signature has been applied. Instead, you’ll need to verify the presence of a signature within those fields by examining the annotations linked to them.
Some things you can try:
Retrieve the signature fields using the getField method to access their properties.
Use the getValue method on each signature field to check if a signature is present.
Inspect the annotations associated with each signature field to determine if they contain signature data.
Set the signatureAdded flag to true if both fields are signed.
I can’t upload the original file because it has confidential info of our business, but I can upload a sample file with the exact signature fields of the original PDF.
There seems to be an ongoing investigation with this API currently as the default signing mode has changed to appearance and is currently not working as expected.
As a temporary workaround, please change the signing mode to Annotation, sign the fields and then the areRequiredFieldsFilled() API should be working. For example:
When I try the code you posted, I get following error on setSigningMode:
“TS2339: Property setSigningMode does not exist on type Tool”
I get this kind of error for a lot of Apryse’s methods and I don’t know why. Maybe it has something to do with me using TypeScript instead of plain JavaScript?
These typescript warnings can be safely ignored and the methods should be working as expected. If there is an error that seems to be interfering, please submit a bug report to our support portal and we will be able to assist you further.