Xlsm to pdf : The max length of the font name is 31`

After switching from Centos to a minimal Ubuntu Container, we started getting that error when converting an .xlsm file to pdf :

INFO | jvm 5 | 2023/10/10 09:21:01 | com.aspose.cells.CellsException: The max length of the font name is 31

The fonts installed on both servers are the same. This error seems to be occuring only with .xlsm and when a font is not on the system. Example when using Arial Narrow font (not on the server), the error occured and when using Liberation sans, the error did not occur.

Here is the code :

  com.aspose.cells.Workbook workbook = new com.aspose.cells.Workbook(input.getAbsolutePath());

  try {
  	com.aspose.cells.PdfSaveOptions saveOptions = new com.aspose.cells.PdfSaveOptions();
  	if (pdfFormat == ConversionManagerPdfFormat.PDF_A1) {
  	workbook.save(output.getAbsolutePath(), saveOptions);

  	if (pdfFormat == ConversionManagerPdfFormat.PDF_A2) {
  		convertPDFToPDFA2A(output, output);
  } finally {

@defale ,

It seems that you are using old versions of Aspose.Cells for Java.
Please try our lastest version Aspose.Cells for Java 23.11.

Our subscription is over and we cannot update it to Aspose.Cells 21.11.

Is there no workaround this issue? Or do you have more information on why this is happening, why it worked on our previous operating system and not the current one?

When the corresponding font is not found, Aspose.Cells will use system fonts for substitution. Due to the difference in operating systems, one possible reason for the exception might be an issue with font substitution on Ubuntu. You can test with the latest version, and if the new version resolves the issue, it is recommended to update promptly.