If you became a customer of the Syncfusion� Reporting Platform or the Report Viewer, Report Designer, or Report Writer components before October 2019 and have questions related to those products, you can request support through our forum system. However, please note that this support system is only for existing customers who are still using the Syncfusion� Reporting Platform or its components and not for new customers looking for reporting products from Syncfusion�.

For new customers or those with general reporting questions, we recommend contacting our support team at https://support.boldreports.com/, which is a separate brand created by Syncfusion� for its reporting solutions. Our team will be happy to assist you with any questions you may have.

Thank you for choosing Syncfusion� for your reporting needs.

Net 6.0 on OSX - not generating image in report

Hi

Microsoft removed System.Drawing.Common from Net. 6, so it is not possible to use image in the reports, the hosting is on Linux/OSX. 

There is error: 

"The type initializer for 'Gdip' threw an exception.

 ---> System.PlatformNotSupportedException: System.Drawing.Common is not supported on non-Windows platforms. See https://aka.ms/systemdrawingnonwindows for more information."

Do you have any solution, so we can use IMAGE in reports, on system other than Windows?


6 Replies

MR Manoranjan Rajendran Syncfusion Team March 18, 2022 07:30 AM UTC

Hi Tomasz,


Thanks for contacting Bold Reports support.


You should install the libgdiplus dependent library to resolve this issue. Please refer to the below documentation for this.

https://help.boldreports.com/embedded-reporting/faq/can-the-aspnet-core-report-viewer-and-report-designer-be-used-on-linux-and-macos/


Regards,

Manoranajn R



TO Tomasz March 18, 2022 12:43 PM UTC

Hi

I've installed libdigiplus, as described in the documentation, but it not change anything.

I have the same error - in ReportViewer there are not any images, in exported pdf there is error as above.


Best Regards



MR Manoranjan Rajendran Syncfusion Team March 18, 2022 12:53 PM UTC

Hi  Tomasz,


Thanks for the update.


Could you please share your issue report, exported PDF file, and issue snap with us. We will check and share the further details.

Also, please check and share any console errors that occur in your browser and share the error log file with us. 
https://help.boldreports.com/embedded-reporting/aspnet-core-reporting/report-viewer/error-logging/



Regards,

Manoranjan R



TO Tomasz March 18, 2022 01:06 PM UTC

This is when report opened:


Class Name: ImageJsonModel

 Method Name: GetModel

 Error Message: at System.Drawing.SafeNativeMethods.Gdip.GdipLoadImageFromDelegate_linux(StreamGetHeaderDelegate getHeader, StreamGetBytesDelegate getBytes, StreamPutBytesDelegate putBytes, StreamSeekDelegate doSeek, StreamCloseDelegate close, StreamSizeDelegate size, IntPtr& image)

   at System.Drawing.Image.InitializeFromStream(Stream stream)

   at System.Drawing.Bitmap..ctor(Stream stream, Boolean useIcm)

   at System.Drawing.Bitmap..ctor(Stream stream)

   at BoldReports.Serialization.JsonModels.ImageJsonModel.GetModel(IReportItemModeler model, Boolean isPrintMode)

 Stack Trace: at System.Drawing.SafeNativeMethods.Gdip.GdipLoadImageFromDelegate_linux(StreamGetHeaderDelegate getHeader, StreamGetBytesDelegate getBytes, StreamPutBytesDelegate putBytes, StreamSeekDelegate doSeek, StreamCloseDelegate close, StreamSizeDelegate size, IntPtr& image)

   at System.Drawing.Image.InitializeFromStream(Stream stream)

   at System.Drawing.Bitmap..ctor(Stream stream, Boolean useIcm)

   at System.Drawing.Bitmap..ctor(Stream stream)

   at BoldReports.Serialization.JsonModels.ImageJsonModel.GetModel(IReportItemModeler model, Boolean isPrintMode)




This are when report is exported as PDF:



Class Name:

 Method Name:

 Error Message:

 Stack Trace: at System.Drawing.SafeNativeMethods.Gdip.GdipLoadImageFromDelegate_linux(StreamGetHeaderDelegate getHeader, StreamGetBytesDelegate getBytes, StreamPutBytesDelegate putBytes, StreamSeekDelegate doSeek, StreamCloseDelegate close, StreamSizeDelegate size, IntPtr& image)

   at System.Drawing.Image.InitializeFromStream(Stream stream)

   at System.Drawing.Image.LoadFromStream(Stream stream, Boolean keepAlive)

   at System.Drawing.Image.FromStream(Stream stream, Boolean useEmbeddedColorManagement, Boolean validateImageData)

   at System.Drawing.Image.FromStream(Stream stream, Boolean useEmbeddedColorManagement)

   at System.Drawing.Image.FromStream(Stream stream)

   at Syncfusion.Pdf.Graphics.PdfTiffImage..ctor(Stream stream)

   at BoldReports.Writer.PdfWriter.GetPdfImageForStream(Byte[] imageData)

   at BoldReports.Writer.PdfWriter.GetPdfBitmap(ImageModel imageModel)

   at BoldReports.Writer.PdfWriter.ProcessImageModel(IReportItemModeler reportModel, Int32 m_currentPageNumber, PdfPage currentPage, PdfItemCellModel cellModel)

   at BoldReports.Writer.PdfWriter.ProcessHeaderFooteritems(PageModelFactory PageModelFactory, Boolean isHeader, PdfGraphics graphics, Int32 m_currentPageNumber, PdfPage currentPage)


Class Name:

 Method Name:

 Error Message:

 Stack Trace: at System.Drawing.SafeNativeMethods.Gdip.GdipLoadImageFromDelegate_linux(StreamGetHeaderDelegate getHeader, StreamGetBytesDelegate getBytes, StreamPutBytesDelegate putBytes, StreamSeekDelegate doSeek, StreamCloseDelegate close, StreamSizeDelegate size, IntPtr& image)

   at System.Drawing.Image.InitializeFromStream(Stream stream)

   at System.Drawing.Image.LoadFromStream(Stream stream, Boolean keepAlive)

   at System.Drawing.Image.FromStream(Stream stream, Boolean useEmbeddedColorManagement, Boolean validateImageData)

   at System.Drawing.Image.FromStream(Stream stream, Boolean useEmbeddedColorManagement)

   at System.Drawing.Image.FromStream(Stream stream)

   at Syncfusion.Pdf.Graphics.PdfTiffImage..ctor(Stream stream)

   at BoldReports.Writer.PdfWriter.GetPdfImageForStream(Byte[] imageData)

   at BoldReports.Writer.PdfWriter.GetPdfBitmap(ImageModel imageModel)

   at BoldReports.Writer.PdfWriter.ProcessImageModel(IReportItemModeler reportModel, Int32 m_currentPageNumber, PdfPage currentPage, PdfItemCellModel cellModel)

   at BoldReports.Writer.PdfWriter.ProcessHeaderFooteritems(PageModelFactory PageModelFactory, Boolean isHeader, PdfGraphics graphics, Int32 m_currentPageNumber, PdfPage currentPage)




Attachment: Archive_8b9edf11.zip


MR Manoranjan Rajendran Syncfusion Team March 21, 2022 04:17 PM UTC

Hi Tomasz,


Thanks for the update.


We are checking with shared error details. We will share the details on or before March 24th, 2022.


Regards,

Manoranjan R



MR Manoranjan Rajendran Syncfusion Team March 22, 2022 01:51 PM UTC

Hi Tomasz,


Could you please share your issue reproducible sample with us? It's helpful for our further validation.


Regards,

Manoranjan R


Loader.
Up arrow icon