Hi,
I’ve got the following problem:
I’m trying to convert excel file to pdf.
This works flawlessly in Amonzon Linux 2.
Can anyone help me please?
Aspose.Cell:20.7
Java:1.8
OS: Amonzon Linux 2
Test Code:
List newFontPathsList = new ArrayList();
newFontPathsList.add("/usr/sare/font/googlefonts");
newFontPathsList.add("/usr/sare/font/externalFont");
FontRepository.setLocalFontPaths(newFontPathsList);
FontRepository.loadFonts();
Workbook book = new Workbook(new FileInputStream(inputFile));
addCustomDocumentProperties(book);
final PdfSaveOptions pdfSaveOptions = new PdfSaveOptions();
pdfSaveOptions.setDefaultFont(“Sans”);
pdfSaveOptions.setOnePagePerSheet(true);
pdfSaveOptions.setCustomPropertiesExport(PdfCustomPropertiesExport.STANDARD);
book.save(os, pdfSaveOptions);
Excel made using english language can convert to pdf successfuly.
But it has garbled code in the pdf if origin file made using Japanese or Chinese.language