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 08, 2022 11:19 am

I am trying to check examle from site "Add a Visible Digital Signature to PDF" with my pdf file and cert on NET5 console project
On doc.SaveToFile("VisiableSignature.pdf"); has an error:

System.NullReferenceException
HResult=0x80004003
Message = Object reference not set to an instance of an object.
Spire.Pdf
Stack Trace:
at sprぢ.ᜀ..ctor(sprて A_0, spr⹣ A_1, spr㉼ A_2, sprう A_3, sprう A_4, spr㉖ A_5)
at Spire.Pdf.Interactive.DigitalSignatures.PdfPKCS7Formatter.Sign(Byte[] content)
at sprⲢ.ᜀ()
at sprⲢ.ᜂ(spr᝭ A_0)
at sprⲢ.ᜀ(Object A_0, sprញ A_1)
at sprជ.ᜀ(sprញ A_0)
at sprជ.ᜀ(spr᝭ A_0, Boolean A_1)
at sprជ.ᜃ(spr᝭ A_0)
at spr᠃.ᜀ(sprᝫ A_0, sprណ A_1, sprᦂ A_2)
at spr᠃.ᜀ(sprᝫ A_0, sprᦂ A_1)
at spr᠃.ᜄ(sprᦂ A_0)
at spr᠃.ᜅ(sprᦂ A_0)
at spr᝞.ᜁ(sprᦂ A_0)
at spr᝞.ᜀ(Stream A_0)
at Spire.Pdf.PdfDocumentBase.Save(String filename)
at Spire.Pdf.PdfDocument.SaveToFile(String filename)

The same code in NetFramework console app all good.

Version 8.6.0 NET5
Version 8.6.1.0 NetFremework

Pls help.
Thanx.

gmikhailov
 
Posts: 1
Joined: Tue Nov 08, 2022 11:10 am

Wed Nov 09, 2022 8:42 am

Hello,

Thanks for your inquiry.
I did a test for the function of adding a visible digital signature to PDF(https://www.e-iceblue.com/Tutorials/Spi ... NET.html#2) in a .NET 5.0 project, but I didn't reproduce your issue. To help us reproduce your issue and provide you with a solution soon. Please share the following information.
1) Your pdf file and cert file. You can attach them here or send them to [email protected].
2) Your full code.
3) Your test environment, such as OS info (E.g. Windows 10, 64-bit) and region setting (E.g. China, Chinese).

Thanks for your assistance in advance.

Sincerely,
Brand
E-iceblue support team

Brand.Luo
 
Posts: 4
Joined: Mon Oct 31, 2022 6:15 am

Wed Dec 28, 2022 3:35 am

Hello,

Hope you are doing well.
Has your issue been solved? If not, could you please share the following information?
1) Your pdf file and cert file. You can attach them here or send them to [email protected].
2) Your full code.
3) Your test environment, such as OS info (E.g. Windows 10, 64-bit) and region setting (E.g. China, Chinese).

Thanks for your assistance in advance.

Sincerely,
Amy
E-iceblue support team
User avatar

amy.zhao
 
Posts: 3043
Joined: Wed Jun 27, 2012 8:50 am

Return to Spire.PDF