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

Free Support Forum - aspose.com

Export specific Sheet(page) into image

My vsd file has multiple pages (sheets). With current Aspose.Diagram api I can export only default page into image.
drawing.Save(output, SaveFileFormat.PNG);
I found that I can get number of total pages using drawing.Pages.Count property, but I can't get anything except default page rendered. I tried to set
drawing.DocumentSettings.TopPage = page;
but that doesn't work the way I expected.

Please advice.

Hi Alexey,

If you want to render all the pages of a diagram, you can use TIFF as SaveFileFormat which will save the diagram as a multipage TIFF. There are two possible ways to render a specific page e.g.

  1. Provide page index in the save options as you can see in the following code.
//Load diagram
Diagram diagram = new Diagram("MultiPage.vsd");
//Save diagram as PNG
ImageSaveOptions options = new ImageSaveOptions(SaveFileFormat.PNG);
options.PageIndex = 2;
diagram.Save("Output.png", options);
  1. Add the page(s) to be rendered in a new diagram and render new diagram.

Please feel free to contact us in case you have further comments or questions.

Best Regards,

Thanks! that worked.