I want to convert my visio file to png, I write code this way,
Diagram dgrm = new Diagram(oriFilePath);
dgrm.save(targetFilePath, SaveFileFormat.PNG);
however, only first page of visio is contained in the png. Is there a way for me to get a long png contain all visio pages montaged in it. Any visio more than two pages can be the sample.
@guguzzz
We are Sorry but we do not support saving the content of all pages as a single PNG file.
Please try this sample code to generate pngs for each page, and then use tools to stitch these pngs together.
for (int i = 0; i < diagram.Pages.Count; i++)
{
// Save diagram as PNG
Aspose.Diagram.Saving.ImageSaveOptions options = new Aspose.Diagram.Saving.ImageSaveOptions(SaveFileFormat.Png);
// Save one page only, by page index
options.PageIndex = i;
// Save resultant Image file
diagram.Save( "page" + i + ".png", options);
}
Thanks.
Thank you, this should work.
@guguzzz
Thanks for following the suggested workaround.
Please feel free to contact us in case you have further comments or questions.