NPOI
NPOI copied to clipboard
Getting initialization error for System.DrawingCore.GDIPlus on Fedora 28
I use Fedora 28. I have already followed following steps described in readme.
dnf install libgdiplus
cd /usr/lib64/
ln -s libgdiplus.so.0 gdiplus.dll
this may help for diagnosing the issue.
[j@l etc]$ ldconfig -p |grep gdi
libgdiplus.so.0 (libc6,x86-64) => /lib64/libgdiplus.so.0
System.TypeInitializationException : The type initializer for 'System.DrawingCore.GDIPlus' threw an exception.
---- System.DllNotFoundException : Unable to load shared library 'gdiplus' or one of its dependencies. In order to help diagnose loading problems, consider setting the LD_DEBUG environment variable: libgdiplus: cannot open shared object file: No such file or directory
at System.DrawingCore.GDIPlus.GdipGetGenericFontFamilySansSerif(IntPtr& fontFamily)
at System.DrawingCore.FontFamily..ctor(GenericFontFamilies genericFamily)
at System.DrawingCore.FontFamily.get_GenericSansSerif()
at System.DrawingCore.Font.CreateFont(String familyName, Single emSize, FontStyle style, GraphicsUnit unit, Byte charSet, Boolean isVertical)
at NPOI.SS.Util.SheetUtil.IFont2Font(IFont font1)
at NPOI.SS.Util.SheetUtil.GetColumnWidth(ISheet sheet, Int32 column, Boolean useMergedCells)
at NPOI.XSSF.UserModel.XSSFSheet.AutoSizeColumn(Int32 column, Boolean useMergedCells)
at Pompa.WebApp.Services.InvoiceCastingService.CastStream(PurchaseRecord[] records, Stream output) in /home/j/dev/src/pompa/Potomatik/Services/InvoiceCastingService.cs:line 24
at Pompa.Tests.InvoiceCastingFacts.Invoice_Cast() in /home/j/dev/src/pompa/pompa.tests/InvoiceCastingFacts.cs:line 25
----- Inner Stack Trace -----
at System.DrawingCore.GDIPlus.GdiplusStartup(UInt64& token, GdiplusStartupInput& input, GdiplusStartupOutput& output)
at System.DrawingCore.GDIPlus..cctor()