Spire.Doc is a professional Word .NET library specifically designed for developers to create, read, write, convert and print Word document files. Get free and professional technical support for Spire.Doc for .NET, Java, Android, C++, Python.

Tue Jan 05, 2021 12:41 pm

Hello!

I have the following problem with PDF converter

com.spire.xls.Workbook workbook = new com.spire.xls.Workbook();
workbook.loadFromFile(outXlsxFilePath);
workbook.getConverterSetting().setSheetFitToPage(true);
// convert xlsx fail to pdf
Exception line---> workbook.saveToFile(outTmpPdfPath, FileFormat.PDF);

this give the stacktrace:

java.lang.IllegalStateException: Cannot found font installed on the system.
at com.spire.xls.packages.sprnZb.spr (Unknown Source)
at com.spire.xls.packages.sprnZb.spr (Unknown Source)
at com.spire.xls.packages.sprucA.spr (Unknown Source)
at com.spire.xls.packages.sprGhA.spr (Unknown Source)
at com.spire.xls.packages.sprtIA.spr (Unknown Source)
at com.spire.xls.packages.sprtIA.spr (Unknown Source)
at com.spire.xls.packages.sprtIA.spr (Unknown Source)
at com.spire.xls.packages.sprtIA.spr (Unknown Source)
at com.spire.xls.packages.sprtIA.spr (Unknown Source)
at com.spire.xls.packages.sprDhA.spr (Unknown Source)
at com.spire.xls.packages.sprDhA.spr (Unknown Source)
at com.spire.xls.core.spreadsheet.XlsWorkbook.spr (Unknown Source)
at com.spire.xls.core.spreadsheet.XlsWorkbook.spr (Unknown Source)
at com.spire.xls.Workbook.saveToFile(Unknown Source)

Using spire.xls.free version 2.2.0 with maven. The only font used in the xlsx is Arial, and that font is located on the ubuntu 20.04 server. Also this exception doesn't happen on another server with ubuntu 18.04, where there aren't almost any fonts installed.
Do you have any ideas how to remedy the issue?

asdfasfa
 
Posts: 4
Joined: Tue Jan 05, 2021 12:34 pm

Wed Jan 06, 2021 6:02 am

Hello,

Thanks for your inquiry.

I simulated a xlsx file with font “Arial” and did an initial test with the latest Free Spire.XLS for Java Version:3.9.1 on ubuntu-20.04.1, but did not reproduce your issue. Since you are using an older version, I'd like to suggest you try again with the latest version. Besides, please make sure that the user you are using has permission to read the font information.

If the issue still occurs, to help us further look into your issue, please provide us with your input file and JDK version (eg: 1.8.0_871). Thanks in advance.

Sincerely,
Marcia
E-iceblue support team
User avatar

Marcia.Zhou
 
Posts: 858
Joined: Wed Nov 04, 2020 2:29 am

Fri Jan 08, 2021 8:58 am

Hello,

Hope you are doing well.

How is the issue now? If it still exists, could you please provide us with your input file and JDK version (e.g.: 1.8.0_871) for further investigation?

Thanks in advance.

Sincerely,
Marcia
E-iceblue support team
User avatar

Marcia.Zhou
 
Posts: 858
Joined: Wed Nov 04, 2020 2:29 am

Fri Jan 15, 2021 4:15 pm

Yes sorry, I thought I posted a reply but I guess it didn't send it. Anyways the problem was solved, thank you very much :)

asdfasfa
 
Posts: 4
Joined: Tue Jan 05, 2021 12:34 pm

Mon Jan 18, 2021 5:48 am

Hello,

Glad to hear that the issue has been solved.

If you encounter any issues related to our product in the future, just feel free to contact us.

Have a nice day!

Sincerely,
Marcia
E-iceblue support team
User avatar

Marcia.Zhou
 
Posts: 858
Joined: Wed Nov 04, 2020 2:29 am

Return to Spire.Doc