Hi,
In my application, I am trying to create a workbook and it’s complaining while trying to find fonts. It’s a new set up on one of our servers, we tried to install fonts into “usr/share/fonts” folder , but still the same error.
Server OS: Red Hat Enterprise Linux Server release 6.5 (Santiago)
Here is the code trying to load:
InputStream fstream = CommonUtils.getInputSreamForClassPathResource(EXCEL_TEMPLATE_ID);
byte[] out = CommonUtils.inputStreamToByteArray(fstream);
ByteArrayInputStream baI = new ByteArrayInputStream(out);
// Instantiating a Workbook object
// Opening the Excel file through the file stream
Workbook workbook = new Workbook(baI);
Error we are getting:
Caused by: java.lang.IllegalArgumentException: java.lang.IllegalArgumentException: Cannot find required font defination[Family:Calibri, Style:0]. Please specify font path.
at com.aspose.cells.a.c.m.a(Unknown Source)
at com.aspose.cells.xV.a(Unknown Source)
at com.aspose.cells.xV.a(Unknown Source)
at com.aspose.cells.WorksheetCollection.W(Unknown Source)
at com.aspose.cells.mf.a(Unknown Source)
at com.aspose.cells.mf.b(Unknown Source)
at com.aspose.cells.mk.s(Unknown Source)
at com.aspose.cells.mk.a(Unknown Source)
at com.aspose.cells.mj.a(Unknown Source)
at com.aspose.cells.Workbook.a(Unknown Source)
at com.aspose.cells.Workbook.(Unknown Source)
at com.nielsen.gps.aw.services.exportcommon.style.StyleFactory.createExcelStyleMap(StyleFactory.java:166)
at com.nielsen.gps.aw.services.exportcommon.style.StyleFactory.(StyleFactory.java:103)
... 44 more
Caused by: java.lang.IllegalArgumentException: Cannot find required font defination[Family:Calibri, Style:0]. Please specify font path.
at com.aspose.cells.a.d.co.b(Unknown Source)
... 57 more