Page number remains 4 when converting to image/PDF

Thank you for your support.

I have converted No8.vsd to image/pdf with Aspose Diagaram 17.11. Please find errors in No8_x.png and No8.pdf.
No8.zip (26.4 KB)
No8_1.png (4.4 KB)
No8_2.png (4.5 KB)
No8.pdf (20.8 KB)

I have also attached No8.tiff whichi is the image that MS Visio outputs as a reference.
No8.tif.zip (7.2 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("No8.vsd");

        // Convert to PDF
        var saveOption = new Aspose.Diagram.Saving.PdfSaveOptions();
        // SaveForegroundPagesOnly
        saveOption.SaveForegroundPagesOnly = true;
        diagram.Save("No8.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("No8_{0}.png", imgPageNum), options);

            imgPageNum++;
        }
    }
}

}

@PFU.DSOL2,

We managed to replicate the problem of incorrect page number in our environment. We have logged tickets in our bug tracking system as follows:

DIAGRAMNET-51410: VSD to PDF - the page number remains 4 in all pages
DIAGRAMNET-51411: VSD to image - the page number remains 4 in all pages

We have linked your post to these tickets and will keep you informed regarding any available updates.

@PFU.DSOL2,

The linked ticket ID DIAGRAMNET-51410 has been resolved and will be included in the next version 17.12 of Aspose.Diagram for .NET API. We will notify you once the next version is published.

@PFU.DSOL2,

The fixes of linked ticket IDs DIAGRAMNET-51410 and DIAGRAMNET-51411 have been included in the full version 17.12. Please download and try the latest version 17.12 of Aspose.Diagram for .NET API.