Thank you for your support.
I have converted No9.vsd to image(pdf) with Aspose Diagaram 17.11. Please find errors in No9_1.png and No9.pdf.
No9.zip (43.2 KB)
No9_1.png (4.8 KB)
No9.pdf (14.4 KB)
I have also attached No7.tiff whichi is the image that MS Visio outputs as a reference.
No9.tif.zip (11.4 KB)
This is the sample code
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace AsposeDiagramConsoleTest
{
class Program
{
static void Main(string[] args)
{
// Instantiate the License class
Aspose.Diagram.License license = new Aspose.Diagram.License();
license.SetLicense(“Aspose.Total.lic”);
var diagram = new Aspose.Diagram.Diagram("No9.vsd");
// Convert to PDF
var saveOption = new Aspose.Diagram.Saving.PdfSaveOptions();
// SaveForegroundPagesOnly
saveOption.SaveForegroundPagesOnly = true;
diagram.Save("No9.pdf", saveOption);
// Convert to Image
var options = new Aspose.Diagram.Saving.ImageSaveOptions(Aspose.Diagram.SaveFileFormat.PNG);
options.SameAsPdfConversionArea = true;
options.SmoothingMode = Aspose.Diagram.Saving.SmoothingMode.AntiAlias;
int imgPageNum = 1;
for (int i = 1; i <= diagram.Pages.Count; i++)
{
// except background page
if (diagram.Pages[i - 1].Background == Aspose.Diagram.BOOL.True)
continue;
// Convert contains visible layer
foreach (Aspose.Diagram.Layer layer in diagram.Pages[i - 1].PageSheet.Layers)
{
if (layer.Visible.Value == Aspose.Diagram.BOOL.True)
layer.Print.Value = Aspose.Diagram.BOOL.True;
}
options.PageIndex = i - 1;
diagram.Save(string.Format("No9_{0}.png", imgPageNum), options);
imgPageNum++;
}
}
}
}