Aspose.PDF 24.10.0 error in Docker environment on Linux (Ubuntu 22)

I am writing to seek urgent assistance regarding an issue we are experiencing with Aspose.PDF 24.10.0 in our application. We are developing on a .NET 8 environment, where Aspose.PDF functions well on Windows. However, we encounter an error when running the same application in a Docker environment on Linux (Ubuntu 22).

Technical Details:

  • Application Environment : .NET 8
  • Aspose.PDF Version : 24.10.0
  • Operating Systems : Windows (working), Linux (Ubuntu 22, Docker environment)

Application Scenario:

We are trying to convert the following HTML snippet into a PDF document:

<div>123<br><table><tr><th>777</th></tr><tr><td>588</td></tr></table></div>

Troubleshooting Steps Taken:

  1. Installed ttf-mscorefonts-installer on the Linux environment.
  2. Transferred all Windows fonts into the Linux Docker container.
  3. Attempted using Aspose.PDF.Drawing 24.10.0 as an alternative solution.

Error Message:

The application raises the following error when attempting to generate a PDF:

[ERR] An unhandled exception occurred.

System.NotSupportedException: Format of font “URWGothic-Demi” is not supported for new composite fonts

We would be grateful for any guidance or recommendations on resolving this issue. If specific configurations or additional dependencies are required to support Aspose.PDF in a Linux environment, please advise. Should remote diagnostic assistance be possible, we would appreciate any support in arranging this.

Thank you for your attention and support.

@elsalin
I tried to reproduce the problem and I think the reason is still the lack of fonts.
I suggest the simplest solution.
forFontsInLinux.png (5.3 KB)

(The fonts may be different, but at least some are needed)