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.

Fri Aug 28, 2020 2:22 pm

I am evaluating Spire.Presentation, and am getting the an error when saving the slides as SVG. I have tried with Spire.Presentation.Free 2.2.6 and Spire.Presentation 3.8.6 downloaded via Maven, both with the same outcome. The svg output is correctly generated. Appreciate any help to eliminate this please.

My code is:
Code: Select all
...
Presentation ppt = new Presentation();
ppt.loadFromFile(temp.getAbsolutePath(), FileFormat.AUTO);

//Save PPT document to images
SlideCollection slides = ppt.getSlides();
for (int i = 0; i < slides.size(); i++) {
  byte[] bytes = slides.get(i).SaveToSVG();
  FileOutputStream stream = new FileOutputStream(String.format("temp/ToSVG-%d.svg",  i));
  stream.write(bytes);
}
ppt.dispose();
...


And the error is:

class com.spire.presentation.packages.sprLJd: Unknown format. ---> class com.spire.presentation.packages.sprtxC: Unknown format.
com.spire.presentation.packages.sprpwC.spr  (MetafileImage.java:124)
com.spire.presentation.packages.sprEVd.<init>(Metafile.java:54)
com.spire.presentation.packages.sprtwd.spr  (Image.java:176)
com.spire.presentation.packages.sprzob.spr  (Unknown Source)
com.spire.presentation.packages.sprzob.spr  (Unknown Source)
com.spire.presentation.PictureShape.spr  (Unknown Source)
com.spire.presentation.PictureShape.spr  (Unknown Source)
com.spire.presentation.packages.sprXMb.spr  (Unknown Source)
com.spire.presentation.packages.sprXMb.spr  (Unknown Source)
com.spire.presentation.packages.sprXMb.<init>(Unknown Source)
com.spire.presentation.ShapeNode.spr  (Unknown Source)
com.spire.presentation.ShapeNode.spr  (Unknown Source)
com.spire.presentation.SlidePicture.spr  (Unknown Source)
com.spire.presentation.GroupShape.spr  (Unknown Source)
com.spire.presentation.packages.sprrWb.spr  (Unknown Source)
com.spire.presentation.packages.sprrWb.spr  (Unknown Source)
com.spire.presentation.packages.sprrWb.spr  (Unknown Source)
com.spire.presentation.packages.sprrWb.SaveToSVG(Unknown Source)
com.labmonkey.spire.ToSVG.main(ToSVG.java:35)
--- End of inner exception stack trace ---
com.spire.presentation.packages.sprEVd.<init>(Metafile.java:57)
com.spire.presentation.packages.sprtwd.spr  (Image.java:176)
com.spire.presentation.packages.sprzob.spr  (Unknown Source)
com.spire.presentation.packages.sprzob.spr  (Unknown Source)
com.spire.presentation.PictureShape.spr  (Unknown Source)
com.spire.presentation.PictureShape.spr  (Unknown Source)
com.spire.presentation.packages.sprXMb.spr  (Unknown Source)
com.spire.presentation.packages.sprXMb.spr  (Unknown Source)
com.spire.presentation.packages.sprXMb.<init>(Unknown Source)
com.spire.presentation.ShapeNode.spr  (Unknown Source)
com.spire.presentation.ShapeNode.spr  (Unknown Source)
com.spire.presentation.SlidePicture.spr  (Unknown Source)
com.spire.presentation.GroupShape.spr  (Unknown Source)
com.spire.presentation.packages.sprrWb.spr  (Unknown Source)
com.spire.presentation.packages.sprrWb.spr  (Unknown Source)
com.spire.presentation.packages.sprrWb.spr  (Unknown Source)
com.spire.presentation.packages.sprrWb.SaveToSVG(Unknown Source)
com.labmonkey.spire.ToSVG.main(ToSVG.java:35)
at com.spire.presentation.packages.sprEVd.<init>(Metafile.java:57)
at com.spire.presentation.packages.sprtwd.spr  (Image.java:176)
at com.spire.presentation.packages.sprzob.spr  (Unknown Source)
at com.spire.presentation.packages.sprzob.spr  (Unknown Source)
at com.spire.presentation.PictureShape.spr  (Unknown Source)
at com.spire.presentation.PictureShape.spr  (Unknown Source)
at com.spire.presentation.packages.sprXMb.spr  (Unknown Source)
at com.spire.presentation.packages.sprXMb.spr  (Unknown Source)
at com.spire.presentation.packages.sprXMb.<init>(Unknown Source)
at com.spire.presentation.ShapeNode.spr  (Unknown Source)
at com.spire.presentation.ShapeNode.spr  (Unknown Source)
at com.spire.presentation.SlidePicture.spr  (Unknown Source)
at com.spire.presentation.GroupShape.spr  (Unknown Source)
at com.spire.presentation.packages.sprrWb.spr  (Unknown Source)
at com.spire.presentation.packages.sprrWb.spr  (Unknown Source)
at com.spire.presentation.packages.sprrWb.spr  (Unknown Source)
at com.spire.presentation.packages.sprrWb.SaveToSVG(Unknown Source)
at com.labmonkey.spire.ToSVG.main(ToSVG.java:35)

tmarshall
 
Posts: 1
Joined: Fri Aug 28, 2020 10:57 am

Mon Aug 31, 2020 1:55 am

Hello,

Thanks for your inquiry and sorry for the late reply as weekend.
I did an initial test but did not reproduce your issue. To help us better look into your issue, please provide us with your input file. You could upload it here or send it to us (support@e-iceblue.com) via email. Thanks in advance for your assistance.

Sincerely,
Rachel
E-iceblue support team
User avatar

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

Mon Aug 31, 2020 7:24 am

Hi Timothy,

Thanks for providing your file via email.
I have reproduced your issue and logged it in our bug tracking system with the ticket SPIREPPT-1295. We will keep you informed if there is any update. 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

Tue Sep 01, 2020 7:27 am

Hello,

Hope you are doing well.
Regarding the issue SPIREPPT-1295, after further investigation, we found that it is because the images in your document are damaged (as shown below), this caused the program to throw the error. However, this doesn't affect the execution of the program, so you can see the svg output is correctly generated. Hope you can understand.
Open in Microsoft PowerPoint.png

Sincerely,
Rachel
E-iceblue support team
User avatar

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

Return to Spire.Presentation