Page 1 of 1

failed to export Excel/PDF on Linux (docker)

Posted: Mon Jan 31, 2022 7:52 am
by alabanu
Hello,

I have a .NET core 3.1 application that uses Stimulsoft net core 2022.1.5. When I try to save my report on my development windows machine the exported file is fine. But when I deployed that application to a linux (docker) machine, the exported PDF or Excel using "Load" operation failed with error "message: "Exceptions.GetReportError: Unable to find an entry point named 'GdipCloneFont' in shared library 'gdiplus.dll'."

Code: Select all

StiReport report = new StiReport(); 
report.Load(Path.Combine(Directory.GetCurrentDirectory(), "ReportTemplates", templateFile + ".mrt"));
Is this a known issue, and is there a workaround?

Re: failed to export Excel/PDF on Linux (docker)

Posted: Mon Jan 31, 2022 12:26 pm
by alabanu
I 've just found the solution

1st : install libgdiplus from dockerfile:
RUN apt-get update
RUN apt-get install -y libgdiplus
RUN cd /usr/lib && ln -s libgdiplus.so gdiplus.dll
RUN apt-get install -y --no-install-recommends libc6-dev

2nd :
https://askubuntu.com/questions/651441/ ... -in-ubuntu
Install cabextract, a tool needed to unpack self-extracting .exe archives:

sudo apt install cabextract
Download the font package provided via this page (also note the EULA there):

wget https://www.freedesktop.org/software/fo ... nts.tar.gz
Unpack, twice:

tar -xzf webfonts.tar.gz
cd msfonts/
cabextract *.exe
Move the fonts to your user's directory for installing additional fonts:

cp *.ttf *.TTF ~/.local/share/fonts/
Restart the software in which you want to use the fonts, and they should be ready to use.

Re: failed to export Excel/PDF on Linux (docker)

Posted: Mon Jan 31, 2022 1:14 pm
by Max Shamanov
Hello,

You are welcome.