Digital Signature

I have problem when i sign document multiple time when  the document exported from(SSRS) microsoft sql reporting  service(RDL report export to pdf )



Attachment: tetsing_dkdkdkdk_b19f9037.zip

3 Replies

GK Gowthamraj Kumar Syncfusion Team February 1, 2022 02:16 PM UTC

Hi Mohamed, 

We have checked the provided sample on our end, we can add multiple signature in PDF document without breaking the existing one. We have to disable the IncrementalUpdate property for resolving this issue in sample level. Please refer to the below code snippet, 

loadedDocument.FileStructure.IncrementalUpdate = False 

We have attached the sample and output document for your reference, please try the sample on your end and let us know the result. 

Please let us know if you need any further assistance in this. 

Regards, 
Gowthamraj K 



MO Mohamed February 2, 2022 07:38 AM UTC

I added line of code to upgrade version of Documnet  pdf DigitalDocument.FileStructure.Version = PdfVersion.Version1_7 

in  code and it work well   but I want to know why that happen 



GK Gowthamraj Kumar Syncfusion Team February 2, 2022 01:23 PM UTC

Hi Mohamed,

 
The earlier file version “1.3” or below does not support incremental updates and so we have always allowed the document to rewrite the entire file and it causes the first signature to become invalid when the second sign. However, we can overcome this issue by setting the file version to “1.4” or above and rewrite the entire file for an initial sign. 
 
            //Load PDF document  
            PdfLoadedDocument loadedDocument = new PdfLoadedDocument(file); 
 
            if ((loadedDocument.FileStructure.Version == PdfVersion.Version1_0 || loadedDocument.FileStructure.Version == PdfVersion.Version1_1 || loadedDocument.FileStructure.Version == PdfVersion.Version1_2 || loadedDocument.FileStructure.Version == PdfVersion.Version1_3)) 
            { 
                loadedDocument.FileStructure.Version = PdfVersion.Version1_4; or above 
                loadedDocument.FileStructure.IncrementalUpdate = false; 
            } 
 
 
Regards, 
Gowthamraj K 


Loader.
Up arrow icon