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

Free Support Forum - aspose.com

Convert PDF file to SVG

Hi, I am recently using Aspose to convert pdf files to svg files.

The fllowing is my code:

Document doc = new Document(“expdf.pdf”);
SvgSaveOptions saveOption = new SvgSaveOptions();
saveOption.CompressOutputToZipArchive = false;
// SVG file
UUID uuid = UUID.randomUUID();
File tbFile = new File(“tmp/”+uuid.toString()+".svg");
doc.save(tbFile.getName(), saveOption);

I got an exception like this:
java.lang.ClassCastException: com.aspose.pdf.internal.p230.z10$z9 cannot be cast to [B

Please help me figure out what’s happening, thank you

Hi Craigabyss,

Thanks for using our API.

Can you please share the resource PDF document so that we can test the conversion at our end. We are sorry for your inconvenience.

Hi, There are 2 pdf files in .zip

I got the exception I mentioned while converting both of them to svg

Thanks for your help :slight_smile:

Hi Carigabyss,

Thanks for your inquiry. While testing the scenario with your shared document, we have managed to reproduce the issue with latest version of Aspose.Pdf for Java 9.5.0. We have logged a ticket PDFNEWJAVA-34478 in our issue tracking system for further investigation and resolution. We will notify you as soon as it is resolved.

We are sorry for the inconvenience caused.

Best Regards,

The issues you have found earlier (filed as PDFNEWJAVA-34478) have been fixed in Aspose.Pdf for Java 9.5.2.

This message was posted using Notification2Forum from Downloads module by Aspose Notifier.