Free Support Forum - aspose.com

Export as image or pdf more than on page

Hi,

Is it possible to export/save all vsd pages as image or in pdf?

Thanks in advance,
Victor

Hi,


Thank you for your interest in our Aspose.Diagram product. It is a pure .NET API for working with the MS Visio Object Model. Aspose.Diagram provides better performance and is easier to use to manipulate diagrams and convert files in multiple formats i.e. PDF.JPG etc. For more details please visit documentation links below:
http://www.aspose.com/docs/display/diagramnet/Product+Overview
http://www.aspose.com/docs/display/diagramnet/Save+VSD+file+to+different+file+formats+%28VDX%2C+PDF+and+JPEG%29

Thanks for information. But if you try for example this code from your link

…….
using Aspose.Diagram;
…….
//Load diagram
Diagram vsdDiagram = new Diagram(@“D:\Templates\Drawing1.vsd”);
//Save as PDF
vsdDiagram.Save(@“D:\Output\Drawing1.pdf”, SaveFileFormat.PDF);
//Save as JPEG
vsdDiagram.Save(@“D:\Output\Drawing1.jpg”, SaveFileFormat.JPEG);


The output pdf will contain only the first page of input vsd file same for jpeg. Is it bug?

Hi,

Thank you for your inquiry. I would like to update you that there are some evaluation limitations. You can avoid evaluation limitations by getting a temporary license for 30 days and try the latest version at your end.

You can learn all about how Aspose products are licensed by checking out the Licenses FAQ here: http://www.aspose.com/corporate/purchase/faqs/default.aspx
http://www.aspose.com/docs/display/diagramnet/License+Aspose.Diagram+for+.NET

After applying a license if you get the same problem then please share input VSD document here in this thread. We'll take a closer look and guide you accordingly.

Hi,

The pdf cotains all pages from input vsd with 30days license, Thanks for information about that. But what about if I want to export each page in to image? It seems that there is no save or export methods in Page class?

Victor
Hi,

Thank you for your inquiry. Here is the code snippet to extract page as bitmap image:

Diagram diagram = new Diagram("input.vsd");

//Save diagram as BMP or other

ImageSaveOptions options = new ImageSaveOptions(SaveFileFormat.BMP);

options.PageIndex = 1;

MemoryStream stream = new MemoryStream();

diagram.Save(stream, options);

diagram.Save("c:\\temp\\Output.bmp", options);


Please let me know for further assistance and comments.


Thank you that exactly what I need.