Thank you for your support.
I have converted No7.vsd to image with Aspose Diagaram 17.11. Please find errors in No7_1.png and No7.pdf.
No7.zip (1.7 MB)
No7_1.png (4.4 KB)
No7.pdf (11.4 KB)
I have also attached No7.tiff whichi is the image that MS Visio outputs as a reference.
No7.tif.zip (358.6 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("No7.vsd");
// Convert to PDF
var saveOption = new Aspose.Diagram.Saving.PdfSaveOptions();
// SaveForegroundPagesOnly
saveOption.SaveForegroundPagesOnly = true;
diagram.Save("No7.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("No7_{0}.png", imgPageNum), options);
imgPageNum++;
}
}
}
}