Adobe reader unable to render PDF, consisting SVG with expanded path

Hi, we require help with one of the use case of ours, we have created a PDF using Aspose.pdf where we have embedded an SVG file which contains expanded text, but when we try and open it in adobe reader, these expanded texts are not rendered correctly, but when we open the same PDF on a browser, it gets rendered correctly.

Please find the link to the zip file of the SVG and the generated PDF here. Please check the differences on the logo on the left side and the Govt. warning on the right side of the PDF in adobe reader and browsers(Chrome/FF/Safari etc).

Please find the code that we have used to generate the PDF below:

SAXBuilder builder = new SAXBuilder();
org.jdom2.Document document = builder.build(new FileInputStream(new File(“/home/ubuntu/Desktop/svg_with_preserve_aspect_ratio.svg”)));

document.getRootElement().setAttribute(“width”, “648”);
document.getRootElement().setAttribute(“height”, “408”);

String outputSvg = new XMLOutputter().outputString(document);

com.aspose.pdf.Document pdfDocument1 = new com.aspose.pdf.Document();
com.aspose.pdf.Page page = pdfDocument1.getPages().add();
page.setPageSize(720, 1072);

com.aspose.pdf.Image image = new com.aspose.pdf.Image();
image.setFixHeight(306);
image.setFixWidth(486);
image.setFileType(com.aspose.pdf.ImageFileType.Svg);
image.setImageStream(new ByteArrayInputStream(outputSvg.getBytes()));
image.getMargin().setBottom(-3);

for(int i=0;i<2;i++){
page.getParagraphs().add(image);
}

pdfDocument1.save(“/home/ubuntu/Desktop/generated_pdf_using_preserve_aspect_ratio.pdf”);

Looking forward to hearing from you.

@wvlabelmaker,

We have already logged an investigation under the ticket ID PDFJAVA-37431 in our issue tracking system. In order to convert the SVG to raster format without compromising quality, we can try Aspose.Imaging API because it is specific to the image manipulation. We are in communication with the Aspose.Imaging API expert and will share our findings with you.

@wvlabelmaker,

We have tested SVG export to raster image with Aspose.Imaging API and managed to replicate the problem of image quality along with the missing Car shape. It has been logged under the ticket ID IMAGINGJAVA-907 in our bug tracking system. We have linked your post to this ticket and will keep you informed regarding any available updates.

Hi Imran, is there any update on this ticket?

Thanks.

@wvlabelmaker,

The linked ticket ID IMAGINGJAVA-907 is pending for the analysis and not resolved yet. We will let you know once a significant progress has been made in this regard.

The issues you have found earlier (filed as IMAGINGJAVA-907) have been fixed in this update. This message was posted using BugNotificationTool from Downloads module by mudassir.fayyaz