Aspose.Cells convert xlsx to PDF in docker without libgdiplus


I am developing a C# application and it involves converting an xlsx file to pdf in a containerized environment in Linux. When i do that using Workbook.Save(filePath, SaveFormat.Pdf), it returns Internal Server Error 500. I read another topic and it involves the usage of library libgdiplus. But i don’t have permissions to install any package. Is there a way to do it without installing a library?

You need to install libgdiplus to use it in containerized environment in Linux. Let us know your feedback after installing it.

Hi, I tried to install the libgdiplus using docker file, but still not able to successfully convert xlsx to pdf. I’ve attached the logs. Could you please check what’s wrong? Also, i’m using cloud foundry.
Following is the docker file script to install libgdiplus:
FROM AS base

RUN apt-get update

RUN apt-get install -y libgdiplus libc6-dev

RUN apt-get install -y libicu-dev libharfbuzz0b libfontconfig1 libfreetype6 (1.6 KB)

You may please go through the following article for more information on running Aspose.Cells in Docker and share your feedback. If the issue is not resolved, share a runnable simplified solution for our reference.

How to Run Aspose.Cells in Docker

You may also refer to this thread for more details.


Thanks for providing the help. I tried these things and it didn’t quite work out. I tried and installed the package libc6-dev (and libgdiplus which already exists in the dotnet core buildpack of cloud foundry).
Following is the debian package i tried to install:

Apart from this, i specifically tried and install the libgdiplus package as well from the URL:

But I’m still getting the same exception as i mentioned in the previous reply. Is there an alternate package that i can make use of, or any other alternate way?

We need to investigate this issue in detail and have logged a ticket into our issues management database. You will be notified here once any update is ready for sharing.

This issue is logged as:
CELLSNETCORE-281 - Aspose.Cells convert xlsx to PDF in docker without libgdiplus

1 Like

HI @gurdeepsingh1409
Based on the Docker image you choose, I’ve created the following Dockerfile, which has been tested and is available, try this: (529 Bytes)

Thanks for the file Leo, much appreciated. I’m working on Cloud foundry and i just have developer rights, so i cant push the docker image. Only thing i can do is use the apt buildpack for cloudfoundry and mention my packages names in apt.yml. Please refer the whole process at docker - Install libc6-dev, libgdiplus and libx11-dev using manifest.yml file on Cloud foundry - Stack Overflow
How can i achieve this?

Hi @gurdeepsingh1409
We need to verify your develope environment, we may not have done a similar configuration on cloud foundry before.
Is this your development environment?

1 Like

Yes, that’s correct.

HI @gurdeepsingh1409
I’m sorry, I did a little research on the platform and didn’t find the right sign up option, like this: Cloud Foundry Members - Open Source Cloud Platform | Cloud Foundry
this is not the sign up page I was looking for. Also, finding some developer training and certification pages doesn’t seem to be the right direction. (I don’t think I’ll be a certified Cloud Foundry developer in a short time :wink:

So it’s hard for me to simulate your environment right now. Do you have any suggestions for me to partially understand and simulate your environment? Thank you.