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.

Tue Jul 21, 2020 8:28 am

Hello, I am evaluating Spire.Presentation for Java and I am happy with that, but I encountered an Exception when I try to open a pptx presentation. Here's the code:

Code: Select all
Presentation pre = new Presentation(src, FileFormat.AUTO);

that throws this exception

Code: Select all
java.lang.ClassCastException: class com.spire.presentation.packages.sprNZC cannot be cast to class com.spire.presentation.converter.openxml.PptxBaseXmlElement (com.spire.presentation.packages.sprNZC and com.spire.presentation.converter.openxml.PptxBaseXmlElement are in unnamed module of loader 'app')
   at com.spire.presentation.GroupShape.<init>(Unknown Source)
   at com.spire.presentation.GroupShape.<init>(Unknown Source)
   at com.spire.presentation.ActiveSlide.spr               (Unknown Source)
   at com.spire.presentation.ActiveSlide.<init>(Unknown Source)
   at com.spire.presentation.packages.sprnvb.<init>(Unknown Source)
   at com.spire.presentation.packages.sprtVb.spr               (Unknown Source)
   at com.spire.presentation.packages.sprtVb.spr                              (Unknown Source)
   at com.spire.presentation.packages.sprtVb.spr               (Unknown Source)
   at com.spire.presentation.packages.sprtVb.<init>(Unknown Source)
   at com.spire.presentation.Presentation.loadFromFile(Unknown Source)
   at com.spire.presentation.Presentation.<init>(Unknown Source)


I tried to use a specific format, FileFormat.PPTX_2013, but I get same result; I tried with different version of the library, from the latest 3.7.4 backward to 2.11.2 and still get same exception; 2.10.1 seems to work but doesn't "import" the presentation well. Obviously src points to the file I'm trying to import, and that file is correctly opened with PowerPoint. If I open the file with PowerPoint and save it without make any correction, after that the file is correclty imported.

This behaviour doesn't happen with all presentations, but it occours with a specific file which is the result of a conversion from a pdf; since it contains sensitive information I'd like to share with you in a private way and not directly in the forum, is it possible?

Thank you
Paolo

pitchbull
 
Posts: 2
Joined: Mon Jul 06, 2020 12:20 pm

Tue Jul 21, 2020 8:39 am

Hi Paolo,

Thanks for using our product.
You could directly send your input file to me (Rachel.Lei@e-iceblue.com) via email. Then I will do further testing to confirm whether this issue exists or not.
Waiting for you to provide your file.

Sincerely,
Rachel
E-iceblue support team
User avatar

rachel.lei
 
Posts: 1571
Joined: Tue Jul 09, 2019 2:22 am

Tue Jul 21, 2020 10:12 am

Hi Paolo,

Thanks for sharing your file via email.
I have reproduced your issue and logged it in our bug tracking system with the ticket SPIREPPT-1229 for further investigation. If there is any update, we will let you know.
Sorry for the inconvenience caused.

Sincerely,
Rachel
E-iceblue support team
User avatar

rachel.lei
 
Posts: 1571
Joined: Tue Jul 09, 2019 2:22 am

Fri Jan 29, 2021 7:59 am

Hello,

Thanks for your patient waiting.
Glad to inform you that we just released Spire.Presentation for Java Version:4.1.6 that fixes the issue SPIREPPT-1229. Welcome to download it from the following links.
Website link: https://www.e-iceblue.com/Download/pres ... -java.html
Maven link: http://repo.e-iceblue.com/nexus/content ... ion/4.1.6/

Sincerely,
Rachel
E-iceblue support team
User avatar

rachel.lei
 
Posts: 1571
Joined: Tue Jul 09, 2019 2:22 am

Return to Spire.Presentation