Hi,
We are using Aspose.Diagram v19.12 for generating PNG/PDF output of visio pages. In the output, the visio page is getting cropped fom the top. So the content that was in the middle of the page now appears at the top.
It was working fine in earlier versions (tested with Aspose.Diagram v19.9), so it is a break in the latest version.
Following code is used to generate the PNG:
Diagram diagram = new Diagram("spring-overview.vsd");
String pageName = "Page-1";
Page srcPage = diagram.getPages().getPage(pageName);
int imageFormat = SaveFileFormat.PNG;
ImageSaveOptions options = new ImageSaveOptions(imageFormat);
options.setResolution(96);
int pageIndex = 0;
for (Page page : (Iterable) diagram.getPages()) {
if (page.getID() == srcPage.getID()) {
options.setPageIndex(pageIndex);
options.setPageCount(1);
break;
}
pageIndex++;
}
File outputFile = new File("output.png");
diagram.save(outputFile.getAbsolutePath(), options);
Please find attached the source visio file and it’s PNG output:
attachments.zip (118.9 KB)
Can you please look into this.
Thanks,
Neha