Spire.Presentation is a professional PowerPoint® compatible library that enables developers to create, read, write, modify, convert and Print PowerPoint documents. Get free and professional technical support for Spire.Presentation for .NET, Java, Android, C++, Python.

Mon Aug 02, 2021 7:55 am

My OS is MacOS.Follow the Spire.Presentation for java tutorial edit demo code.But there was an exception.
Demo is Java create PowerPoint chart.
Code: Select all
Warning: the font "Times" is not available, so "Lucida Bright" has been substituted, but may have unexpected appearance or behavor. Re-enable the "Times" font to remove this warning.
Warning: the font "Times" is not available, so "Lucida Bright" has been substituted, but may have unexpected appearance or behavor. Re-enable the "Times" font to remove this warning.
Exception in thread "main" java.lang.ExceptionInInitializerError
   at com.spire.presentation.packages.sprxVd.spr                              (Font.java:410)
   at com.spire.presentation.packages.sprxVd.<init>(Font.java:398)
   at com.spire.presentation.packages.sprxVd.<init>(Font.java:380)
   at com.spire.presentation.packages.sprxVd.<init>(Font.java:402)
   at com.spire.presentation.packages.sprlKb.<init>(Unknown Source)
   at com.spire.presentation.packages.sprKob.spr                              (Unknown Source)
   at com.spire.presentation.packages.sprKob.spr                              (Unknown Source)
   at com.spire.presentation.packages.sprKob.spr                              (Unknown Source)
   at com.spire.presentation.packages.sprSwb.spr               (Unknown Source)
   at com.spire.presentation.packages.sprSwb.spr                              (Unknown Source)
   at com.spire.presentation.packages.sprSwb.spr                              (Unknown Source)
   at com.spire.presentation.packages.sprSwb.spr                              (Unknown Source)
   at com.spire.presentation.packages.sprSwb.<init>(Unknown Source)
   at com.spire.presentation.packages.sprNub.spr                              (Unknown Source)
   at com.spire.presentation.packages.sprNub.spr                              (Unknown Source)
   at com.spire.presentation.packages.sprNub.spr                              (Unknown Source)
   at com.spire.presentation.packages.sprpJa.spr                              (Unknown Source)
   at com.spire.presentation.GroupShape.spr                              (Unknown Source)
   at com.spire.presentation.packages.sprjUb.spr                              (Unknown Source)
   at com.spire.presentation.packages.sprjUb.spr                              (Unknown Source)
   at com.spire.presentation.packages.sprjUb.spr                              (Unknown Source)
   at com.spire.presentation.packages.sprHWb.spr                              (Unknown Source)
   at com.spire.presentation.packages.sprHWb.spr                              (Unknown Source)
   at com.spire.presentation.packages.sprHWb.spr                              (Unknown Source)
   at com.spire.presentation.packages.sprHWb.spr                              (Unknown Source)
   at com.spire.presentation.packages.sprHWb.spr                              (Unknown Source)
   at com.spire.presentation.Presentation.saveToFile(Unknown Source)
   at com.example.demo.ppt.CreatePPT.main(CreatePPT.java:30)
Caused by: class com.spire.presentation.packages.sprzId: FontFamily 'Serif' not found
Parameter name: Serif
com.spire.presentation.packages.sprYUd.<init>(FontFamily.java:328)
com.spire.presentation.packages.sprYUd.<init>(FontFamily.java:312)
com.spire.presentation.packages.sprYUd.<init>(FontFamily.java:379)
com.spire.presentation.packages.sprYUd.<clinit>(FontFamily.java:1147)
com.spire.presentation.packages.sprxVd.spr                              (Font.java:410)
com.spire.presentation.packages.sprxVd.<init>(Font.java:398)
com.spire.presentation.packages.sprxVd.<init>(Font.java:380)
com.spire.presentation.packages.sprxVd.<init>(Font.java:402)
com.spire.presentation.packages.sprlKb.<init>(Unknown Source)
com.spire.presentation.packages.sprKob.spr                              (Unknown Source)
com.spire.presentation.packages.sprKob.spr                              (Unknown Source)
com.spire.presentation.packages.sprKob.spr                              (Unknown Source)
com.spire.presentation.packages.sprSwb.spr               (Unknown Source)
com.spire.presentation.packages.sprSwb.spr                              (Unknown Source)
com.spire.presentation.packages.sprSwb.spr                              (Unknown Source)
com.spire.presentation.packages.sprSwb.spr                              (Unknown Source)
com.spire.presentation.packages.sprSwb.<init>(Unknown Source)
com.spire.presentation.packages.sprNub.spr                              (Unknown Source)
com.spire.presentation.packages.sprNub.spr                              (Unknown Source)
com.spire.presentation.packages.sprNub.spr                              (Unknown Source)
com.spire.presentation.packages.sprpJa.spr                              (Unknown Source)
com.spire.presentation.GroupShape.spr                              (Unknown Source)
com.spire.presentation.packages.sprjUb.spr                              (Unknown Source)
com.spire.presentation.packages.sprjUb.spr                              (Unknown Source)
com.spire.presentation.packages.sprjUb.spr                              (Unknown Source)
com.spire.presentation.packages.sprHWb.spr                              (Unknown Source)
com.spire.presentation.packages.sprHWb.spr                              (Unknown Source)
com.spire.presentation.packages.sprHWb.spr                              (Unknown Source)
com.spire.presentation.packages.sprHWb.spr                              (Unknown Source)
com.spire.presentation.packages.sprHWb.spr                              (Unknown Source)
com.spire.presentation.Presentation.saveToFile(Unknown Source)
com.example.demo.ppt.CreatePPT.main(CreatePPT.java:30)
   at com.spire.presentation.packages.sprYUd.<init>(FontFamily.java:328)
   at com.spire.presentation.packages.sprYUd.<init>(FontFamily.java:312)
   at com.spire.presentation.packages.sprYUd.<init>(FontFamily.java:379)
   at com.spire.presentation.packages.sprYUd.<clinit>(FontFamily.java:1147)
   ... 28 more

whaoyang
 
Posts: 1
Joined: Mon Aug 02, 2021 7:41 am

Mon Aug 02, 2021 9:23 am

Hello,

Thanks for your inquiry.
According to the error message you provided, the exception is because the font "Serif" is not installed in your MacOS system. Please try again after installing this font

Sincerely
Brian
E-iceblue support team
User avatar

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

Fri Aug 06, 2021 10:24 am

Hello,

Hope you are doing well.
Has your issue been resolved? Any feedback will be greatly appreciated.

Sincerely,
Brian
E-iceblue support team
User avatar

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

Tue Apr 26, 2022 9:31 am

I also get the same exception.
Where can I find Serif fonts?

macos 12.3.1
spire.presentation.free 5.1

Warning: the font "Times" is not available, so "Lucida Bright" has been substituted, but may have unexpected appearance or behavor. Re-enable the "Times" font to remove this warning.
Warning: the font "Times" is not available, so "Lucida Bright" has been substituted, but may have unexpected appearance or behavor. Re-enable the "Times" font to remove this warning.
Exception in thread "main" java.lang.ExceptionInInitializerError
at com.spire.presentation.packages.sprvqfa.spr      (Font.java:410)
at com.spire.presentation.packages.sprvqfa.<init>(Font.java:398)
at com.spire.presentation.packages.sprvqfa.<init>(Font.java:374)
at com.spire.presentation.packages.sprefo.spr      (Unknown Source)
at com.spire.presentation.packages.sprefo.<init>(Unknown Source)
at com.spire.presentation.packages.sprpho.spr      (Unknown Source)
at com.spire.presentation.packages.sprowo.spr     (Unknown Source)
at com.spire.presentation.GroupShape.spr     (Unknown Source)
at com.spire.presentation.packages.sprfhp.spr      (Unknown Source)
at com.spire.presentation.packages.sprfhp.spr      (Unknown Source)
at com.spire.presentation.packages.sprfhp.spr      (Unknown Source)
at com.spire.presentation.packages.sprthp.spr      (Unknown Source)
at com.spire.presentation.packages.sprthp.spr      (Unknown Source)
at com.spire.presentation.packages.sprthp.spr      (Unknown Source)
at com.spire.presentation.packages.sprthp.spr      (Unknown Source)
at com.spire.presentation.packages.sprthp.spr      (Unknown Source)
at com.spire.presentation.Presentation.saveToFile(Unknown Source)
at CreateChart.main(CreateChart.java:57)
Caused by: class com.spire.presentation.packages.spryaea: FontFamily 'Serif' not found
Parameter name: Serif
com.spire.presentation.packages.sprwufa.<init>(FontFamily.java:328)
com.spire.presentation.packages.sprwufa.<init>(FontFamily.java:312)
com.spire.presentation.packages.sprwufa.<init>(FontFamily.java:379)
com.spire.presentation.packages.sprwufa.<clinit>(FontFamily.java:1147)
com.spire.presentation.packages.sprvqfa.spr      (Font.java:410)
com.spire.presentation.packages.sprvqfa.<init>(Font.java:398)
com.spire.presentation.packages.sprvqfa.<init>(Font.java:374)
com.spire.presentation.packages.sprefo.spr      (Unknown Source)
com.spire.presentation.packages.sprefo.<init>(Unknown Source)
com.spire.presentation.packages.sprpho.spr      (Unknown Source)
com.spire.presentation.packages.sprowo.spr     (Unknown Source)
com.spire.presentation.GroupShape.spr     (Unknown Source)
com.spire.presentation.packages.sprfhp.spr      (Unknown Source)
com.spire.presentation.packages.sprfhp.spr      (Unknown Source)
com.spire.presentation.packages.sprfhp.spr      (Unknown Source)
com.spire.presentation.packages.sprthp.spr      (Unknown Source)
com.spire.presentation.packages.sprthp.spr      (Unknown Source)
com.spire.presentation.packages.sprthp.spr      (Unknown Source)
com.spire.presentation.packages.sprthp.spr      (Unknown Source)
com.spire.presentation.packages.sprthp.spr      (Unknown Source)
com.spire.presentation.Presentation.saveToFile(Unknown Source)
CreateChart.main(CreateChart.java:57)
at com.spire.presentation.packages.sprwufa.<init>(FontFamily.java:328)
at com.spire.presentation.packages.sprwufa.<init>(FontFamily.java:312)
at com.spire.presentation.packages.sprwufa.<init>(FontFamily.java:379)
at com.spire.presentation.packages.sprwufa.<clinit>(FontFamily.java:1147)

seahero520
 
Posts: 2
Joined: Tue Apr 26, 2022 7:02 am

Tue Apr 26, 2022 10:36 am

Hello seahero520,

Thanks for your inquiry.
Since you are using the free version, I recommend that you install the "Serif" font on your mac system and use the latest commercial version (Spire.Presentation for Java Version:5.4.0).

Sincerely,
Annika
E-iceblue support team
User avatar

Annika.Zhou
 
Posts: 1657
Joined: Wed Apr 07, 2021 2:50 am

Tue Apr 26, 2022 1:42 pm

Hi Annika
Thanks for your reply.
I used presentation 5.4, unfortunately it still not working.
I have installed these Serif fonts, what version of Serif fonts should I install?

seahero520
 
Posts: 2
Joined: Tue Apr 26, 2022 7:02 am

Wed Apr 27, 2022 2:27 am

Hello,

Thanks for your feedback.
Please download the attached font and install it in your mac system.

Sincerely,
Annika
E-iceblue support team
User avatar

Annika.Zhou
 
Posts: 1657
Joined: Wed Apr 07, 2021 2:50 am

Sat Jun 04, 2022 2:21 pm

Thank you very much for your answer. I have been confused by this problem for several days recently, and your answer has helped me solve a big problem. I would like to express my sincere thanks to you again. In addition, I would like to ask if there is any potential harm in using the free version of the tool. I hope to get your reply. thank you

sunshengqi
 
Posts: 2
Joined: Sat Jun 04, 2022 2:12 pm

Sat Jun 04, 2022 3:02 pm

I encountered a null pointer error when CONVERTING PPT to PDF, and I hope to get your help. The problem is as follows:

Code: Select all
package com.ssq;

import com.spire.presentation.FileFormat;
import com.spire.presentation.Presentation;

import javax.imageio.ImageIO;
import java.awt.image.BufferedImage;
import java.io.File;
public class PPT2Image {

    public static void main(String[] args) throws Exception {
        //创建Presentation对象
        Presentation ppt = new Presentation();
        //加载示例文档
        ppt.loadFromFile("/Users/sunshengqi/Documents/测试用ppt、pdf、doc/佣金中心(4).pptx");
        //保存为PDF文档
        ppt.saveToFile("/Users/sunshengqi/Documents/测试用ppt、pdf、doc/佣金中心(4).pdf", FileFormat.PDF);
        ppt.dispose();
    }
}


Code: Select all
java.lang.NullPointerException
   at com.spire.office.packages.sproOA.spr  (Unknown Source)
   at com.spire.office.packages.sprXOB.spr  (Unknown Source)
   at com.spire.office.packages.sprrqB.spr  (Unknown Source)
   at com.spire.office.packages.sprblC.spr  (Unknown Source)
   at com.spire.office.packages.sprXjC.spr  (Unknown Source)
   at com.spire.office.packages.sprcjC.spr  (Unknown Source)
   at com.spire.office.packages.sprblC.spr  (Unknown Source)
   at com.spire.office.packages.sprmJC.spr  (Unknown Source)
   at com.spire.office.packages.sprmJC.spr  (Unknown Source)
   at com.spire.office.packages.sprmJC.spr (Unknown Source)
   at com.spire.office.packages.sprSKC.spr  (Unknown Source)
   at com.spire.office.packages.sprEkC.spr  (Unknown Source)
   at com.spire.office.packages.sprYJC.spr  (Unknown Source)
   at com.spire.office.packages.sprkkC.spr  (Unknown Source)
   at com.spire.office.packages.sprXOB.spr (Unknown Source)
   at com.spire.office.packages.sprjBc.spr  (Unknown Source)
   at com.spire.office.packages.sprjBc.spr  (Unknown Source)
   at com.spire.presentation.Presentation.saveToFile(Unknown Source)
   at com.ssq.PPT2Image.main(PPT2Image.java:23)
java.lang.NullPointerException
   at com.spire.office.packages.sproOA.spr  (Unknown Source)
   at com.spire.office.packages.sprXOB.spr  (Unknown Source)
   at com.spire.office.packages.sprrqB.spr  (Unknown Source)
   at com.spire.office.packages.sprblC.spr  (Unknown Source)
   at com.spire.office.packages.sprXjC.spr  (Unknown Source)
   at com.spire.office.packages.sprcjC.spr  (Unknown Source)
   at com.spire.office.packages.sprblC.spr  (Unknown Source)
   at com.spire.office.packages.sprmJC.spr  (Unknown Source)
   at com.spire.office.packages.sprmJC.spr  (Unknown Source)
   at com.spire.office.packages.sprmJC.spr (Unknown Source)
   at com.spire.office.packages.sprSKC.spr  (Unknown Source)
   at com.spire.office.packages.sprEkC.spr  (Unknown Source)
   at com.spire.office.packages.sprYJC.spr  (Unknown Source)
   at com.spire.office.packages.sprkkC.spr  (Unknown Source)
   at com.spire.office.packages.sprXOB.spr (Unknown Source)
   at com.spire.office.packages.sprjBc.spr  (Unknown Source)
   at com.spire.office.packages.sprjBc.spr  (Unknown Source)
   at com.spire.presentation.Presentation.saveToFile(Unknown Source)
   at com.ssq.PPT2Image.main(PPT2Image.java:23)

sunshengqi
 
Posts: 2
Joined: Sat Jun 04, 2022 2:12 pm

Mon Jun 06, 2022 6:18 am

Hi,

Thank you for your inquiry.
1. Kindly note the free version is limited to 10 presentation slides. This limitation is enforced during writing PPT, PPTX. When converting PowerPoint files to PDF, Image, XPS, you can only get the first 3 pages of file. Besides, we do not regularly maintain the free version, all fixes and new features are preferentially included in commercial version.

2. I simulated a PPT and did an initial test but did not reproduce your problem. Please test with our latest commercial version (Spire.Presentation for Java Version:7.5.2). If the problem still exists, please provide the following information for further investigation.
1) Your PPT document
2) The test environment, such as, win10 64bit
3) JDK version, such as, JDK 1.8.0_281

By the way, we also provide Chinese technical support, next time you can contact us using Chinese directly if you want.

Sincerely,
Kylie
E-iceblue support team
User avatar

kylie.tian
 
Posts: 412
Joined: Mon Mar 07, 2022 2:30 am

Wed Sep 21, 2022 3:57 am

Hi,

Greetings from E-iceblue.
Has your problem been effectively solved now? Could you please give us some feedback at your convenience? Thanks in advance.

Sinecrely,
Kylie
E-iceblue support team
User avatar

kylie.tian
 
Posts: 412
Joined: Mon Mar 07, 2022 2:30 am

Return to Spire.Presentation

cron