We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date
close icon

PDF Signatures with Smart Card

Hello there!

I would like to know if this library support PDF signatures using Smart Cards, I saw an example of this but using a .pfx file, Is this possible using Smart Card, if so please let me now, I'm very interesting!!!

Best regards,
Geykel

6 Replies

DK Dhivya K Syncfusion Team November 13, 2006 01:09 PM UTC

Hi Geykel,

Thank you for your interest in Essential PDF.
I am afraid. Currently we do not have support for signing a PDF document with smart card.Also we do not have any immediate plans for implementing it in the near future. However,we do have plans for implementing this feature.

However, we have support for Recipient/standard signature, multiple signature and invisible signature with self signed certificates and with third party certficates.

Please let me know if you have any other queries.

Regards,
Dhivya.


KA Karam replied to Dhivya K June 26, 2018 08:01 AM UTC

Hi Geykel,

Thank you for your interest in Essential PDF.
I am afraid. Currently we do not have support for signing a PDF document with smart card.Also we do not have any immediate plans for implementing it in the near future. However,we do have plans for implementing this feature.

However, we have support for Recipient/standard signature, multiple signature and invisible signature with self signed certificates and with third party certficates.

Please let me know if you have any other queries.

Regards,
Dhivya.

Hi,

Is the smartcard signing now supported ?
In the test I made I get an Arithmetic Overflow exception at .Save()

Unhandled Exception: System.OverflowException: Arithmetic operation resulted in an overflow.
   at Syncfusion.Pdf.Security.PdfSignatureDictionary.DocumentSaved(Object sender, DocumentSavedEventArgs e)
   at Syncfusion.Pdf.PdfDocumentBase.OnDocumentSaved(DocumentSavedEventArgs args)
   at Syncfusion.Pdf.PdfDocument.Save(Stream stream)
   at Syncfusion.Pdf.PdfDocumentBase.Save(String filename)
   at ConsoleApp3.Program.Main(String[] args) in D:\Source\Repos\ConsoleApp3\ConsoleApp3\Program.cs:line 64

Regards


SK Sasi Kumar Sekar Syncfusion Team June 27, 2018 10:39 AM UTC

Hi GeyKel, 
 
Thank you for contacting Syncfusion support. 
 
At present we do not have support for signing pdf using smartcard. We have support for signing PDF from the Certificate store. In order to achieve signing PDF, please save the smartcard certificate to store and sign the PDF using below code snippet. 
 
            //Create PDF document. 
            PdfDocument doc = new PdfDocument(); 
 
            //Add pages. 
            PdfPage page = doc.Pages.Add(); 
 
            //Get certificate from store based on subject. 
            PdfCertificate certificate = PdfCertificate.FindBySubject(StoreType.MY,"subject"); 
 
            //Create Signature. 
            PdfSignature signature = new PdfSignature(doc, page, certificate, "Signature 1"); 
 
            //Set bounds to the signature. 
            signature.Bounds = new RectangleF(0, 0, 100, 100); 
 
            //Save the PDF. 
            doc.Save("Sample.pdf"); 
            doc.Close(true); 
 
 
We have signed the PDF document from the availability of certificate file from the store and the documents are signed property. We suspecting the issue occurs for particular certificate file. Can you please share us the below details used in your side . So, that we could check and provide you the solution earlier. 
  1. Code snippet for signing PDF.
  2. Certificate file and the password.
  3. Essential Studio version.
  4. .Net Framework version.
Note: The private key should be included in the certificate file,  
Please let us know if you need further assistance on this. 
 
Regards, 
Sasi Kumar S. 



KA Karam June 27, 2018 02:52 PM UTC

Hi,

If there is no official support for smartcard, I guess this is the reason why it does not work.
I was hopping it would work because I get to the point where I'm prompted for the smartcard PIN code to access the private key ... but then if fails at Save()

The code is based on your samples except I changed the certificate loading method (see file attached).

I cannot provide you with the private key as the whole point of the smartcard is that the private key is not accessible.
I'm using .NET framework 4.6.1
and your APIs version 16.2.0.41



Attachment: Code_ab2598b.zip


SK Sasi Kumar Sekar Syncfusion Team June 28, 2018 12:31 PM UTC

Hi Karam, 
 
Thank you for your update. 
 
Yes, currently we do not have support for signing PDF from smartcard. However, we could do signing the PDF from windows store. We have ensured all the certificate, which is available from our end and it works as expected. If it is possible to share certificate (PFX), please create new incident and upload certificate in the incident or mail us to support@syncfusion.com in order to maintain the certificate securely. It would be more helpful for us to analyze and provide a solution. 
Please let us know if you need further assistance on this. 
 
Regards, 
Sasi Kumar S


KA Karam June 28, 2018 12:37 PM UTC

Thanks for your reply.

Loader.
Live Chat Icon For mobile
Up arrow icon