Spire.PDF is a professional PDF library applied to creating, writing, editing, handling and reading PDF files without any external dependencies. Get free and professional technical support for Spire.PDF for .NET, Java, Android, C++, Python.

Mon Apr 25, 2022 1:25 pm

I am using freeSpirepdf in dotnet core 3.1 webapi project and deployment environment is linux. I am able to smoothly use freeSpirepdf locally/debug but when i publish and deploy api on linux server i am getting this issue :

System.TypeInitializationException: The type initializer for 'Gdip' threw an exception.
---> System.DllNotFoundException: Unable to load shared library 'libgdiplus' or one of its dependencies. In order to help diagnose loading problems, consider setting the LD_DEBUG environment variable: liblibgdiplus: cannot open shared object file: No such file or directory
at System.Drawing.SafeNativeMethods.Gdip.GdiplusStartup(IntPtr& token, StartupInput& input, StartupOutput& output)
at System.Drawing.SafeNativeMethods.Gdip..cctor()
--- End of inner exception stack trace ---
at System.Drawing.SafeNativeMethods.Gdip.GdipCreatePath(FillMode brushMode, IntPtr& path)
at System.Drawing.Drawing2D.GraphicsPath..ctor()
at spr⤈..ctor()
at Spire.Pdf.PdfPageBase..ctor(sprន A_0, spr᠐ A_1)
at Spire.Pdf.PdfPageWidget..ctor(PdfDocumentBase A_0, spr᠐ A_1, sprន A_2)
at Spire.Pdf.Widget.PdfPageCollection.ᜅ(sprន A_0)
at Spire.Pdf.Widget.PdfFieldWidget.ᜀ()
at Spire.Pdf.Widget.PdfFieldWidget.get_Page()
at Spire.Pdf.Widget.PdfStyledFieldWidget.get_Bounds()
at Spire.Pdf.Widget.PdfTextBoxFieldWidget.ᜀ(String A_0)
at Spire.Pdf.Widget.PdfTextBoxFieldWidget.set_Text(String value)


Experts, All your inputs are welcome. Kindly help me out.

dineshchile
 
Posts: 2
Joined: Mon Apr 25, 2022 12:19 pm

Tue Apr 26, 2022 9:57 am

Hi,

Thank you for your inquiry.
Our Spire.PDF for NETCore uses System.Drawing.Common, which depends on Libgdiplus library. The windows system includes the Libgdiplus library by default, while the Linux and MacOS don't include it. Please install the Libgdiplus library independently on your Linux and try again. The following is the command to install Libgdiplus in Ubuntu and Centos

Ubuntu:
sudo apt-get install libgdiplus

CentOS:
yum whatprovides libgdiplus
yum install -y epel-release
yum install -y libgdiplus-2.10-10.el7.x86_64
yum install -y libgdiplus-devel

In addition, I suggest that you try the latest commercial version (Spire.PDF Pack(Hot Fix) Version:8.4.15), as it is more stable than the free one. If the problem still exists, please provide your test code, input document (if any) as well as your Linux system info for further investigation. You can attach your file here or send it to us via email (support@e-iceblue.com). Thank you in advance.

Sincerely,
Kylie
E-iceblue support team
User avatar

kylie.tian
 
Posts: 412
Joined: Mon Mar 07, 2022 2:30 am

Wed Apr 27, 2022 1:38 pm

Hi Kylie,

Thanks for taking the time to reply this! It helps me.


Regards,
Dinkar

dineshchile
 
Posts: 2
Joined: Mon Apr 25, 2022 12:19 pm

Thu Apr 28, 2022 8:50 am

Hi Dinkar,

Glad to hear that! If you encounter any issues related to our products in the future, please feel free to contact us.
Wish you all the best!

Sincerely,
Kylie
E-iceblue support team
User avatar

kylie.tian
 
Posts: 412
Joined: Mon Mar 07, 2022 2:30 am

Return to Spire.PDF

cron