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.

Wed May 10, 2023 9:16 am

Hello,

Thanks for your patience.
As for this issue, our Dev team have made some adjustments and prepared a temporary product package. Since we do not have the smart card, we need your help to do some verification. Thanks in advance.
The attachment includes 2 screenshots, please use this temporary version to run my previous project and then give the feedback about the following two points.
1. Debug to check your certificate data information, like the screenshot"data.png".
2. Get the output printing log information, like the screenshot"logs.png".

Sincerely,
Lisa
E-iceblue support team
User avatar

Lisa.Li
 
Posts: 1533
Joined: Wed Apr 25, 2018 3:20 am

Mon May 15, 2023 7:22 am

Hello

I've noticed no difference in the out pdf's, certificate information seems valid and the log ouputs are also the same as the once you provided.

I've attached my results.

JeroenRoefs
 
Posts: 15
Joined: Thu Mar 30, 2023 1:52 pm

Mon May 15, 2023 9:18 am

Hello,

Thanks for your more information.
Based on these information, our Dev team positioned it may be caused that the SignatureLength parameter of CustomPKCS7SignatureFormatterWithAPI, your certificate data should exceed this defined length. Thus, please get signature length and set it to "Parameters.Add("SignatureLength", gottenLength);", like the attached screenshot. Look forward to your further testing result.

Sincerely,
Lisa
E-iceblue support team
User avatar

Lisa.Li
 
Posts: 1533
Joined: Wed Apr 25, 2018 3:20 am

Mon May 15, 2023 9:44 am

Hello

This last suggestion did the trick! Using GetSignatureLength() instead of a fixed number worked :)
Thank you very much for your assistance!

JeroenRoefs
 
Posts: 15
Joined: Thu Mar 30, 2023 1:52 pm

Mon May 15, 2023 9:54 am

Hello,

Thanks for your quick response.
I’m so delighted to hear that. If there is anything else we can do for you in the future, just feel free to contact us!

Sincerely,
Lisa
E-iceblue support team
User avatar

Lisa.Li
 
Posts: 1533
Joined: Wed Apr 25, 2018 3:20 am

Return to Spire.PDF