Spire.PDF is a professional PDF library applied to creating, writing, editing, handling and reading PDF files without any external dependencies. Get free and professional technical support for Spire.PDF for .NET, Java, Android, C++, Python.

Tue Nov 12, 2019 2:28 am

Hi Team,

Can you please confirm if spire.pdf supports external / deferred signing.
I will not have private key with me . I will only do hashing and send data to third party service
The service will return public key and signed hashed value and I need to embed this in PDF.

Please confirm if your solution supports it.

naman.shah
 
Posts: 1
Joined: Tue Nov 12, 2019 2:24 am

Tue Nov 12, 2019 7:31 am

Hi,

Thanks for your inquiry.
Sorry that Spire.PDF doesn't support that at present. We will consider adding the new feature in our future upgrade. If there is any update, we will let you know.

Sincerely,
Betsy
E-iceblue support team
User avatar

Betsy.jiang
 
Posts: 3099
Joined: Tue Sep 06, 2016 8:30 am

Tue May 30, 2023 10:28 am

Hi,

Thanks for your patience.
Due to personnel changes within our organization, we inadvertently failed to notify you of the partial implementation of the new features.

We are pleased to inform you that the feature that you suggested have been implemented and are now available for use.
Code: Select all
PdfDocument doc = new PdfDocument();
doc.LoadFromFile(@"test.pdf");
X509Certificate2 cert = new X509Certificate2(@"gary.pfx", "e-iceblue");
//create CustomPKCS7SignatureFormatter
CustomPKCS7SignatureFormatter customPKCS7SignatureFormatter = new CustomPKCS7SignatureFormatter(cert);
PdfSignature signature = new PdfSignature(doc, doc.Pages[0], customPKCS7SignatureFormatter, "signature0");
signature.Bounds = new RectangleF(new PointF(90, 550), new SizeF(270, 90));
signature.GraphicsMode = GraphicMode.SignDetail;
signature.NameLabel = "Signer:";
signature.Name = "Test";
signature.Reason = "The certificate of this document";
signature.DistinguishedNameLabel = "DN: ";
signature.DocumentPermissions = PdfCertificationFlags.AllowFormFill | PdfCertificationFlags.ForbidChanges;
signature.SignDetailsFont = new PdfFont(PdfFontFamily.TimesRoman, 10f);
signature.SignNameFont = new PdfFont(PdfFontFamily.Courier, 15);
signature.SignImageLayout = SignImageLayout.None;
//Save pdf file.
doc.SaveToFile(@"output.pdf", Spire.Pdf.FileFormat.PDF);

We apologize for any inconvenience this may have caused and appreciate your patience and understanding throughout this process.

Thank you for your valuable feedback and support, and please do not hesitate to contact us if you have any further concerns or questions.


Best regards,
Triste
E-iceblue support team
User avatar

Triste.Dai
 
Posts: 1000
Joined: Tue Nov 15, 2022 3:59 am

Return to Spire.PDF

cron