Hi,
I’m trying to run the Add Image in an Existing PDF File tutorial on Debian Buster with .NET 6, but I keep getting the Invalid image stream (The type initializer for ‘Gdip’ threw an exception.) exception when doing
page.Resources.Images.Add(imageStream);
I run the latest version of Aspose.Pdf (22.2.0) and have the latest version of Mono (6.12.0.122) installed, so libgdiplus is already installed.
The full message of the exception is the following:
Invalid image stream (The type initializer for 'Gdip' threw an exception.) - - at Aspose.Pdf.XImageCollection.#=z_Q6YKpulfs7I2gbLuA==(Stream #=zczkUVwg=, #=zbzVqcf6w2ID$VMkn_nrNFngrtIjcAmb2mnMo26iS0I9e #=zE$UTqc0=, #=zmQ2IzQQuwJuzpkkhGQkD9mJSEdqKH_ZQZQ== #=zSMvBw_o=, Int32 #=zIpRNwIU=, Image& #=zT6_Ku9o_ub0m, Stream #=zc6Bb1v8wYVivjNqJNj2V1b0=) at Aspose.Pdf.XImageCollection.#=zlC1BBQSsfXc6(Int32 #=zFr7IclI=, Stream #=zczkUVwg=, Int32 #=zIpRNwIU=, Boolean #=zjDoBBJli7d3i, ImageFilterType #=zaaMpFOY=, Byte #=zhJauUT1DRVJ1, Boolean #=zGhIm6j0=, String& #=zMURLBPipZv3I, Stream #=zc6Bb1v8wYVivjNqJNj2V1b0=) at Aspose.Pdf.XImageCollection.#=zlC1BBQSsfXc6(Int32 #=zFr7IclI=, Stream #=zczkUVwg=, Int32 #=zIpRNwIU=, Boolean #=zjDoBBJli7d3i, ImageFilterType #=zaaMpFOY=, String& #=zI8d1Q7g=)
Do you have any ideas on how to solve the issue?
Thanks in advance.