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) { saveOptions.setCompliance(com.aspose.cells.PdfCompliance.PDF_A_1_A); } workbook.save(output.getAbsolutePath(), saveOptions); if (pdfFormat == ConversionManagerPdfFormat.PDF_A2) { convertPDFToPDFA2A(output, output); } } finally { workbook.dispose(); }