I am building a .net service in docker that will take .xlsx files and render them as .tiff. When I run my service locally on a windows environment the images correctly render with Times New Roman text. When I spin up a docker container and submit the same file it returns a blank .tiff image.
I have tried numerous approaches to have Aspose.Cells work correctly in the docker container based off the Aspose documentation relating to setting the default font source, default font folder, and font substitution but none of the suggested methods work. Below I listed the approach that I believe should work with Aspose.Cells
- Installed fonts-liberation fontconfig and ttf-mscorefonts-installer on the docker container to get access to fonts located in /usr/share/fonts/truetype/
- In the service I have set my source to the following:
FontConfigs.SetFontFolder("/usr/share/fonts/truetype/", true);
The true in this statement will scan subfolders to find the .ttf font files. I expect Aspose to use this file path in the docker container to get needed fonts for rendering. - I verified that I have fonts available in the "/usr/share/fonts/truetype/" folder under sub-folders of liberation and msttcorefonts.
Can anyone offer advice of another approach or potential issue I am running into? I can provide more information if needed as well.