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:
Load a PDF inside the webviewer, without breaking pre-existing signatures
I have a pdf containing a valid signature (signed on the backend side via the âPDFTron.NET.x64â Version=â11.1.0â library in the demo environment)
Loading that pdf into the webviewer and downloading it immediately, the pre-existing signature is invalid.
Using PDFTron.NET.x64 without WebViewer we can, given a pdf with a valid signature, add a signature type acrofield and sign it without breaking the pre-existing signature.
Is it possible from the webviewer to add an acrofield without breaking a pre-existing signature?
Please provide a link to a minimal sample where the issue is reproducible:
From your answer I donât understand how to download, from the webviewer, a previously signed document correctly without breaking the signature.
I add that even in your demo page linked above, if I download a document with a valid signature, then immediately reload the document in the webviewer, the signature is corrupted.
This actually fails on the sample demo for 2 reasons:
The file is not incrementally saved, i.e. instance.UI.downloadPdf({ flags: instance.Core.SaveOptions.INCREMENTAL });
Using the download button doesnât automatically save the file as incremental, so you will need to set this explicitly.
The sample page will add a watermark to the document, which is considered making a change on the document.
If you use a registered license, the signature should remain valid.
Hello,
I tried to implement your solution, on a webviewer with a valid license, but it doesnât work
These are my tests
1) Listening to onDocumentLoad() and immediately downloading the document: the pre-existing signature works correctly
saveSettings FLAG doesnât seems to make differences. I tested no flag, flag INCREMENTAL, or LINEARIZED and i get the same result
2) Listening to onDocumentLoad(), change to editAnnotationView and downloading the document: the pre-existing signature breaks
My Code:
this.instance.Core.documentViewer.addEventListener('documentLoaded', async () => {
this.switchToEditAnnotationsView();
setTimeout(() => {
// CHECK IMAGE - RESULT IF I DOWNLOAD IT WITH SaveOptions.INCREMENTAL
this.instance?.UI.downloadPdf({ flags: this.instance?.Core.SaveOptions.INCREMENTAL});
// CHECK IMAGE - RESULT IF I DOWNLOAD IT WITH SaveOptions.LINEARIZED
// this.instance?.UI.downloadPdf({ flags: this.instance?.Core.SaveOptions.LINEARIZED});
}, 1000);
});
// even manually clicking on data-element="signatureFieldToolGroupButton" I get the same result
switchToEditAnnotationsView() {
const iframeDocument = this.getIframeDocument();
if (iframeDocument) {
const buttonForme = iframeDocument.querySelector('.ribbon-group') as HTMLElement;
buttonForme.click();
const div = iframeDocument.querySelector('.tool-group-button') as HTMLElement;
if (div?.children.length) {
const button = div.children[0] as HTMLElement;
if (button) {
button.click();
button.click();
}
}
}
}
// RESULT IF I DOWNLOAD IT WITH SaveOptions.INCREMENTAL
2) Listening to onDocumentLoad(), change to editAnnotationView and downloading the document: the pre-existing signature breaks
When you switch to this view on WebViewer (form field creation mode), the annotations you see on the document are added as temporary annotations. This would be considered making a change to the document hence breaking the signatures.
Starting from version 11.0, there are no temporary annotations and should not be triggering the annotationChanged events:
Unfortunately, this was a major change that was added to 11.0 and cannot be ported back. I recommend. you not to switch to the formfield creation mode.
Hi, Iâve updated to version 11.2, but the signatures are still getting corrupted. Essentially, Iâm experiencing the same issue as before the update. Iâve tested with PDFs containing valid signatures, such as the attached file, but after loading it into the WebViewer and downloading it, the signature becomes invalid.
How can I add an Acrofield signature without breaking the existing signatures through the WebViewer?
If I take the âwaiver_custom_signed.pdfâ from the result and open/download it on the showcase, you can see that the certification still shows has unmodified, with the digitalSignaturePermission setting at 3:
I have tested the WebViewer v11.2 with the incremental download option immediately after loading the document. Unfortunately, the signatures still become broken as soon as I download the document after loading it, even with the incremental save flag.
This issue is blocking for us, as we need to maintain the integrity of existing signatures while adding new ones (e.g., Acrofield). Could you kindly assist in resolving this? The signatures should remain intact after the document is downloaded and reloaded into the WebViewer.
The demo sample page will fail with the watermark being applied, which is considered a change in the document.
Could you please try with version 11.2.0 (latest) of WebViewer and see if you can reproduce the same result?
I have tested your latest suggestion, and indeed, the behavior aligns with what you described. When using incremental saving with a valid license, reloading the document in WebViewerand running your script in console, i get e_annotating_formfilling_signing_allowed as expected.
However, I have noticed an issue when opening the same downloaded document in Adobe Acrobat. Specifically:
In WebViewer (Apryse), after downloading the document with SaveOptions.INCREMENTAL, the signature field permissions still report e_annotating_formfilling_signing_allowed, which matches the original permissions.
However, when I open the same document in Adobe Acrobat, the signatures appear as corrupted/invalid.
This discrepancy is problematic for us, as we need to ensure that the digital signatures remain valid not only in WebViewer but also in Adobe Acrobat and other standard PDF readers.
Do you have any insights into why Adobe is detecting the signatures as invalid after downloading from WebViewer? Is there a specific setting or approach we should follow to ensure full compatibility?
The signature panel shows the same result, and I do not see any âcorrupted/invalidâ warnings, just the validity of the cert is unknown, and author could not be verified.
If you are wondering about the triangular caution symbol, it is the similar to the yellow warning symbol reported on WebViewer:
I was able to replicate the issue exactly as described. The pre-existing signatures remain valid only if the "toolbarGroup-Forms" is not selected. However, as soon as "toolbarGroup-Forms" is enabled, the signatures break.
This is a major issue for us because we must keep form functionality active to allow users to create additional AcroFields. The final PDF needs to contain both the previously signed AcroFields and the newly created ones, all with valid signatures.
We were previously informed that updating to v11.2 would resolve this issue. However, the problem persists. How can we achieve this workflow without breaking the pre-existing signatures?
To support our findings, I have attached images below that demonstrate the issue.
Looking forward to your guidance on implementing a proper solution.
This issue remains critical for our organization. Pre-existing signatures break when âtoolbarGroup-Formsâ is enabled, preventing us from adding AcroFields without invalidating signatures.
Despite updating to v11.2, the problem persists. We urgently need a solution or workaround to maintain both existing signatures and new form fields.
Thank you for your reply and the steps taken, I was able to reproduce the issue.
It looks like clicking on Forms mode makes changes to form fields hence showing up as âalteringâ the document on Adobe.
Because the original document permissions has a setting of 3 (e_annotating_formfilling_signing_allowed) this means that making changes to form fields is not permitted and seems to be causing the issue.
Prior to version 11, this was happening as expected due to the placeholders, but I have created a ticket for this issue for the product team to review and prioritize.
If the signature is not already signed, you should be able to set the permissions to âunrestrictedâ (security setting 4) to get around this issue for now.