We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

Exception "Null Pointer" when generating SVG using Aspose.Slides for Java


I have a problem when invoking “writeAsSvg()” in different scenarios. The problem is that a NullPointerException is thrown from an internal class and I don’t know the reason.

This is the stack trace:

  • com.aspose.slides.afc in if
  • com.aspose.slides.GeometryShape in do
  • com.aspose.slides.AutoShape in do
  • com.aspose.slides.Shape in do
  • com.aspose.slides.Shape in if
  • com.aspose.slides.Shape$2 in do
  • com.aspose.slides.internal.kz.do in do
  • com.aspose.slides.internal.kz.if in do
  • com.aspose.slides.Shape in writeAsSvg


I have observed the issue shared by you and request you to please first try using latest Aspose.Slides for Java 19.1 on your end. If the issue still persist then please provide working sample code, source presentation, Java and Operating system details for further investigation on our end.


I have updated to the version 19.1 and I have the same problem.

  • Operating system: Ubuntu 18.04.2 LTS
  • Java: openjdk version “1.8.0_191”
  • Source PPT: I attached to this message
  • Sample code:

IPresentation ppt = new com.aspose.slides.Presentation("/home/users/Downloads/Credenciales MHSM_2.pptx");

Code to license

for (IShape shape : ppt.getSlides().get_Item(0).getShapes()) {
SVGOptions opts = new SVGOptions();
shape.writeAsSvg(new FileOutputStream(new File("/home/user/folder/image.svg")), opts);

Thank you for your response!


I have observed your comments. Please share source presentation so that we may further investigate to help you out.


I couldn’t attach it. Here is a link to download it:



I have requested in google drive to access files. Please accept request and inform us here so that we may download files and investigate issue on our end.

I already accepted.



I have observed the issue shared by you and an issue with ID SLIDESJAVA-37564 has been created in our issue tracking system to further investigate and resolve the issue. This thread has been linked with the issue so that you may be notified once the issue will be fixed.