BoldSign®Effortlessly integrate e-signatures into your app with the BoldSign® API. Create a sandbox account!
Hi guys!
As I noticed in my previous comment, I have an issue with loading the document containing previously saved stamp annotations. When I try to load the previously saved file (with the help of await this.SfPdfViewerControl.SaveAsync();) that contains any 1+ stamps (added with SfPdfViewerControl.AddStamp();) I get a crush with the error message exception "An item with the same key has already been added. Key: 1_CustomView1".
The problem sometimes doesn't occur from the first try, but happens around 80% of the time when I try to load the file.
I've noticed this happens if SfPdfViewerControl has any Margin/Padding/Width from the left side of an object. In the case of the sample, <ColumnDefinition Width="50"/> which goes before the <ColumnDefinition Width="*"/> where SfPdfViewerControl is located. If we specify <ColumnDefinition Width="auto"/> instead of 50, the app won't throw any exception. The same error triggers if we for example specify Margin="50,0,0,0" for SfPdfViewerControl.
Please see the file attached which already contains the previously saved stamp object and which triggered the issue. Same problem can be reproduced using any other file with added stamp objects.
Thank you in advance for your help!
Attachment: StampAnnotationIssue_bee4d3fd.zip
Hi Roxy,
We were able to reproduce the issue, “Application crashes with ThrowAddingDuplicateWithKeyArgumentException while loading specific PDFs.”. Currently, we are validating this issue and we will update the further details on April 4, 2024.
Regards
Manoj.
We have confirmed that the issue “Application crashes with ThrowAddingDuplicateWithKeyArgumentException while loading specific PDFs.” is a defect and logged a defect report for this issue. The fix for this issue will be included in the weekly release that is expected to be delivered on April 16, 2024.
Please find the feedback link below,
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 resolved the issue “Application crashes with ThrowAddingDuplicateWithKeyArgumentException while loading specific PDFs” and now the fix for the same is available in our latest weekly NuGet(v25.1.40).
The root cause of this issue is adding the existing stamp annotation of the same page multiple times to the thread asynchronously. Now we have fixed this issue by restricting the process of adding existing stamps on the same page until the previous operations are completed.
Please find our latest Weekly NuGet: https://www.nuget.org/packages/Syncfusion.SfPdfViewer.UWP/25.1.40
It works, thank you! Appreciate your help!
Thank you for your reply. I'm glad to hear that the issue you were experiencing has been resolved. We're marking this ticket as closed.
If you have any other questions or concerns, please don't hesitate to contact us.
Thank you for your patience and understanding.