Dear support,
we want to print SVGs created with http://bpmn.io to PDFs or word documents. In aspose-words there is currently a rendering problem with the arrows.
So we tried out converting svg to png with aspose-imaging 19.4. Unfortunately the resulting PNG looks worse.
test aspose.pngThis is how we converted the SVG:
private InputStream renderWithAspose(InputStream inputStream) throws IOException {
com.aspose.imaging.fileformats.svg.SvgImage image = (com.aspose.imaging.fileformats.svg.SvgImage)
com.aspose.imaging.Image.load(inputStream);
com.aspose.imaging.imageoptions.PngOptions options = new com.aspose.imaging.imageoptions.PngOptions();
final File pngFile = File.createTempFile("SVGImage", ".png");
OutputStream pngFileOutputStream = null;
try {
pngFileOutputStream = new FileOutputStream(pngFile);
image.save(pngFileOutputStream, options);
return new AutoDeleteFileInputStream(pngFile);
} finally {
FailSafeIO.close(pngFileOutputStream);
pngFile.delete();
}
}
Is there a way to use aspose-imaging to convert the SVG and get a proper PNG/JPEG?
Here the input SVG.
Thank you