I’m testing the free version for a Maui project on Windows and MacOS.
On Windows the ‘save as PNG’ is just working fine.
On the Mac I get the following exception:
The type initializer for 'spr⥪' threw an exception.
Any clue?
Regards,
Michael
The type initializer for 'spr⥪' threw an exception.
at sprᜄ.ᜀ(Int32 A_0)
at sprᜄ.ᜂ(Int32 A_0)
at sprᜄ.ᜆ()
at sprᜄ.ᜉ()
at sprᜄ..ctor(Stream A_0, Boolean A_1)
at sprᜄ..ctor(Stream A_0)
at sprᦃ.ᜁ(Stream A_0)
at sprᦃ.ᜁ(Byte[] A_0)
at sprᥳ.ᜀ(Byte[] A_0, sprᝳ A_1)
at spr.ᜀ(Byte[] A_0, String A_1, sprᝳ A_2)
at spr.ᜅ()
at sprᥝ.ᜆ()
at spr.ᜀ(ᜂ A_0)
at spr.ᜄ.ᜁ()
at spr.ᜀ(sprᝧ A_0)
at spr.ᜂ(sprᝧ A_0)
at spr.ᜂ()
at spr.ᜀ()
at spr.ᜁ()
at spr.ᜂ(sprᝧ A_0)
at Spire.Pdf.Widget.PdfPageCollection.ᜀ(Int32 A_0, Int32& A_1, Boolean A_2)
at Spire.Pdf.Widget.PdfPageCollection.ᜀ(Int32 A_0)
at Spire.Pdf.Widget.PdfPageCollection.get_Item(Int32 index)
at Spire.Pdf.PdfDocumentBase.ᜀ(Int32 A_0, Int32 A_1, Int32 A_2)
at Spire.Pdf.PdfDocument.SaveAsImage(Int32 pageIndex, Int32 dpiX, Int32 dpiY)
at Sample_SpirePdf.MainPage.PDF2PNG(String filepath, Int32 pageNumber) in /Volumes/Data/GitWare/Apps/AnybookPro/R&D/Sample_SpirePdf/MainPage.xaml.cs:line 27Stream stream = new MemoryStream();
stream = pdfDocument.SaveAsImage(0);
stream.Position = 0;
String result = @"..\..\..\output\result_SaveAsImage0.png";
byte[] buffer = new byte[stream.Length];
stream.Read(buffer, 0, buffer.Length);
File.WriteAllBytes(result, buffer);