Adding multiple signatures on a pdf version 1.3 causes the first signature to become invalid.
i tested on higher versions 1.4,1.6 & 1.7 ... all are working fine.
Please check attached files
Note that this issue does not happen if i add the signatures using adobe reader.
Hope you fix it in next weekly release.
Attachment: pdfv1.3_ffb59816.zip
Hi,
As per the PDF specification, PDF versions 1.3 or below do not support incremental updates (revisions). For multiple signatures, incremental updates are necessary. So, if incremental support is not available in version 1.3, this problem arises during restructuring. Therefore, this is the expected behavior. If you need to have multiple signatures, you should upgrade your document to a version above 1.3 or the latest version. Please refer to the KB documentation for further details:
https://support.syncfusion.com/kb/article/8369/how-to-change-the-pdf-version-using-c-and-vb-net
Regards,
Jeyalakshmi T
thanks for your clarification ... i found that adobe reader automatically changes the pdf version to 1.6 when adding a signature to a pdf file of version less than 1.6 (1.5,1.4,1.3)
Can you do a similar behaviour in PdfLoadedDocument.Save syncfusion function ... in order to fix this issue and handle all pdf versions ?
Hi Jacobs,
We don't have direct support to change the PDF version. However, we can achieve this using our PDF library. We have prepared the sample and attached for your reference, we request you to try this on your end and let us know if need any further assistance.
PdfLoadedDocument loadedDocument = new PdfLoadedDocument("../../Sample.pdf"); var fileStructureVersion = loadedDocument.FileStructure.Version; if (fileStructureVersion< PdfVersion.Version1_6) { loadedDocument.FileStructure.Version = PdfVersion.Version1_6; loadedDocument.FileStructure.IncrementalUpdate = false; loadedDocument.Save("Output.pdf"); loadedDocument.Close(true); } |
Regards,
Jeyalakshmi T
Thanks ... but your proposed workaround (changing pdf version) will only work if the original file does not contain any signatures, i.e. If the file is of version 1.3 and already have signatures ... then after converting to 1.7 (syncfusion proposed workaround) the old signatures become invalid.
Note that this behaviour does not happen when signing with adobe reader, adobe can add multiple signatures to a v1.3 file that already contains signatures without corrupting any existing signatures and also upgrades the file to 1.6.
check attached files
Attachment: pdfv1.3_onesignature_then_75ebada8.zip
Currently, we are analyzing this and will update further details on March 13, 2024.
Thank you for your patience,
As per the PDF specification 1.7, the PDF version 1.4 earlier, does not support incremental updates. So, we have followed to maintain the same in our PDF library. Therefore, an existing signature becomes invalid due to incremental is not done. However, to address the problem we request to apply incremental updates as highlighted below if the PDF version is 1.3 at the sample level.
Can you assist in providing a way to do the same behavior as adobe .... upgrade pdf version + support incremental updates for any version less than 1.6?
I need to handle all pdf versions same as adobe.
Knowing that while signing a v1.3 pdf file ... when i use your previous provided code Incremetalupdate= true along with setting pdfversion = 1.7 ... the existing signature stays valid without any corruption but the pdf version is not upgraded to 1.7 and stays 1.3.
Waiting for your reply.
Upon further analysis, we found that adobe only shows the PDF version as 1.6 for this document. Because of Adobe doesn’t change the PDF version 1.6 instead of it adding version number to PDF document catalog entry. We have also cross-checked this with Foxit Reader application and the version is remained the same as 1.3, similar to our PDF library. You can refer the following screenshot for further details.
Foxit reader:
Adobe:
Before Incremental update
After Incremental Update
However, currently, we are analyzing to add the version to the catalog as like Adobe on our end and we will update further details on March 19,2024.
Upon further analysis and consultation with other viewers, Adobe displays the PDF version of this document as 1.6. This occurs because Adobe does not alter the PDF version to 1.6; instead, it appends the version number to the PDF document catalog entry. We have verified this with another viewer application, where the version remains consistent at 1.3, aligning with our PDF library. Please confirm if you require this fix to be implemented mandatorily. If yes, then we will include it in our upcoming weekly release on 2nd April 2024.
yes please ... i need to handle signatures for all pdf versions same as adobe
We have confirmed the issue “Version is not updated after signing the pdf version 1.3" as a defect in our product and we will include the fix in weekly release on 2nd April 2024.
Please use the below feedback link to track the status of the reported bug.
https://www.syncfusion.com/feedback/51982/version-is-not-updated-after-signing-the-pdf-version-1-3
Note: If you require a patch for the reported issue in any of our Essential Studio Main or SP release version, then kindly let us know the version, so that we can provide a patch in that version based on our SLA policy.
Disclaimer: “Inclusion of this solution in the weekly release may change due to other factors including but not limited to QA checks and works reprioritization.”
We have included the fix for this issue “Version is not updated after signing the pdf version 1.3”fix in our latest weekly release (25.1.38).Please download the Nuget from the below link
Nuget Link: NuGet Gallery | Syncfusion.Pdf.Net.Core 25.1.38
Root Cause:
We noticed that there is an issue with version is not updated after signing the pdf version 1.3 and less than versions. This is causing the problem.
Thanks .... can you please specify if there is any special code that i should write such as checking on certain pdf version or setting Incremetalupdate= true ... or will it work automatically without adding extra code ?
On our further analysis, you need not to check the file version just enable incremental update to updating the file version.
Why should i set the incrementalupdate ... i just need to add the signature to the document and if version is 1.3 or less ... it should be upgrade automatically like adobe.
Note that i have tested on the pdf 1.3 with onesignature in my first reply and used incrementalupdate= true ... the pdf version is still not updated ... however i expected that you will fix this issue internally in the nuget without the need of writing any extra code to handle all types of versions .... same as adobe
As we informed earlier, As per the PDF specification 1.7, the PDF version 1.4 earlier, does not support incremental updates. So, we have followed to maintain the same in our PDF library. Therefore, an existing signature becomes invalid due to incremental is not done.In our latest version, we have fixed to update the 1.3 and less than version to 1.6 version like as Adobe only if enabling the incremental update
Thanks , i am confirming that your suggested solution is working fine .... pdf version is upgraded to 1.6 by only setting incrementalupdate= true for pdf versions less than 1.4
We are glad to hear that issue has been resolved on your end. please let us know if you need any other assistance.