failed to export Excel/PDF on Linux (docker)

Stimulsoft Reports.WEB discussion
Post Reply
alabanu
Posts: 2
Joined: Mon Jan 31, 2022 7:13 am

failed to export Excel/PDF on Linux (docker)

Post 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?
alabanu
Posts: 2
Joined: Mon Jan 31, 2022 7:13 am

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

Post 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.
Max Shamanov
Posts: 990
Joined: Tue Sep 07, 2021 10:11 am

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

Post by Max Shamanov »

Hello,

You are welcome.
Post Reply