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.