Spire.XLS is a professional Excel .NET library that can be used to any type of .NET( C#, VB.NET, ASP.NET, .NET Core) application and Java (J2SE and J2EE) application.

Wed Jul 14, 2021 1:10 pm

Good day,

I'm having trouble with spire.XLS (Java version), converting excel file to pdf.
I am using Google's Noto Serif CJK JP.
In Windows 10 environment, it converted to pdf but when I check the pdf's font properties, it's not Noto Serif.
In Linux environment, it throws an error.
Both Windows 10 and Linux have Noto Serif CJK fonts installed.
By the way, I tried the latest Spire.XLS version 4.6.5.

Here's my code,
Code: Select all
String excelFile = "test_excel.xlsx";
Workbook wb = new Workbook();
wb.loadFromFile(excelFile);
wb.getConverterSetting().setSheetFitToPage(true);
wb.saveToFile(excelFile.replace(".xlsx", ".pdf"), FileFormat.PDF);


Is it possible that the converted pdf file's font is also Noto Serif CJK?

Thanks and regards,
Attachments
test_excel_and_result_pdf.zip
Excel file test and the pdf result file
(30.56 KiB) Downloaded 188 times

babyspidy
 
Posts: 2
Joined: Wed Jul 14, 2021 12:30 pm

Thu Jul 15, 2021 9:17 am

Hello,

Thanks for your inquiry.
I tested your case and did notice that the fonts in the PDF file are inconsistent with the fonts in the Excel file. I have logged this issue in our bug tracking system with the ticket SPIREXLS-3347. Our Dev team will investigate further and fix it. If there is any update, we will let you know. Apologize for the inconvenience caused.

Sincerely,
Brian
E-iceblue support team
User avatar

Brian.Li
 
Posts: 1242
Joined: Mon Oct 19, 2020 3:04 am

Mon Jul 19, 2021 12:52 am

Thank you for the response.

Any workaround for this? I tried setting through custom font file paths, but it's still not rendering the correct font.

Regards,

babyspidy
 
Posts: 2
Joined: Wed Jul 14, 2021 12:30 pm

Mon Jul 19, 2021 3:26 am

Hello,

Thanks for your feedback.

Yes, I also tried to set up custom font file paths and indeed found that the font in the result file is incorrect. We are sorry that there is no workaround at this moment.

Besides, this issue is a bit complicated, and our developers need more time to investigate further. Anyway, once there is any update, we will let you know ASAP.

Sincerely,
Brian
E-iceblue support team
User avatar

Brian.Li
 
Posts: 1242
Joined: Mon Oct 19, 2020 3:04 am

Thu Sep 09, 2021 12:19 pm

Hello,

Greetings from E-iceblue!
Glad to inform you that we just released Spire.XLS for Java Version:4.9.0 which fixes your issue, please download it from the following links to test on your side. Looking forward to your test result.
Website link: https://www.e-iceblue.com/Download/xls-for-java.html
Maven link: https://repo.e-iceblue.com/nexus/conten ... xls/4.9.0/

Sincerely,
Brian
E-iceblue support team
User avatar

Brian.Li
 
Posts: 1242
Joined: Mon Oct 19, 2020 3:04 am

Thu Sep 16, 2021 10:36 am

Hello,

Greetings from E-iceblue.
Does this hotfix solve your issue? Could you please give us some feedback at your convenience?

Sincerely,
Brian
E-iceblue support team
User avatar

Brian.Li
 
Posts: 1242
Joined: Mon Oct 19, 2020 3:04 am

Return to Spire.XLS