I have a .net core 3.1 project and I'm trying to create a pdf file from a Document object on ubuntu 20.04 amd64 and I get this:
- Code: Select all
Unhandled exception. System.NullReferenceException: Object reference not set to an instance of an object.
at sprᰋ.ᜁ(TextRange A_0, spr᭲ A_1, RectangleF& A_2, Boolean A_3, spr៧ A_4)
at sprᰋ.ᜀ(TextRange A_0, IDocumentObject A_1, Paragraph A_2, String A_3, Boolean A_4)
at sprឦ.ᜀ(RectangleF A_0)
at sprឣ.ᜋ(sprអ A_0)
at sprឣ.ᜁ(RectangleF A_0)
at sprឤ.ᜂ(sprអ A_0)
at sprឣ.ᜁ(RectangleF A_0)
at sprឣ.ᜋ(sprអ A_0)
at sprឣ.ᜁ(RectangleF A_0)
at sprព.ᜀ(sprឌ A_0, sprឆ A_1, sprᰋ A_2)
at sprᰃ.ᜋ()
at sprᰃ.ᜒ()
at sprᰃ.ᜓ()
at sprᰃ.ᜀ(IDocument A_0)
at spr᱔.ᜀ(Document A_0, Stream A_1, ToPdfParameterList A_2)
at Spire.Doc.Document.ᜀ(String A_0, ToPdfParameterList A_1)
at Spire.Doc.Document.ᜅ(String A_0)
at SpireTest.Report.CreateChapter2(String resourcePath, String outputPath) in /root/res/SpireTest/SpireTest/Report.cs:line 42
at SpireTest.Program.Main(String[] args) in /root/res/SpireTest/SpireTest/Program.cs:line 10
I tested this project on my windows 10 pc and it worked just fine! I have also installed libgdiplus package and I have no idea why it is happening. please help me!
I attached my code to the attachment.