I have written below code for converting PDF to SVG.
doc = new Document(pathToInputPdfFile);
com.aspose.pdf.Page pdfPage = doc.getPages().get_Item(1);
newDocument = new Document();
SvgSaveOptions saveOptions = new SvgSaveOptions();
saveOptions.CompressOutputToZipArchive = false;
Its is working fine with PDFs without images. If there is any image in the PDF, rendered SVG is showing below error. However the java code executed doesn’t show any error in the console though rendered SVG has an error.
This page contains the following error:
error on line 123 at column 7: PCDATA invalid char value 3
Below is the rendered of the page up to the first error:
Please let me know if there is a way where I can raise exception when the SVG has errro in it.