using System;
using GroupDocs.Conversion.Options.Convert;

namespace ConvertVsdxToPdfInCSharp
{
    class Program
    {
        public static void Main(string[] args) // Main function to convert VSDX to PDF using C#
        {
            // Remove the watermark in output PDF document by adding license
            string licensePath = "GroupDocs.Conversion.lic";
            GroupDocs.Conversion.License lic = new GroupDocs.Conversion.License();
            lic.SetLicense(licensePath);
            
            // Load the source VSDX file for conversion to PDF
            var converter = new GroupDocs.Conversion.Converter("sample.vsdx");
                
            // Set the convert options for PDF document
            var convertOptions = new PdfConvertOptions();

            // Convert and save the VSDX in PDF format
            converter.Convert("converted.pdf", convertOptions);

            Console.WriteLine("Done");
        }
    }
}