Aspose.Diagram.Examples.CSharp.Working_with_Print.PrintDiagramVisXPSPrinterAPI.Run C# (CSharp) Method

Run() public static method

public static Run ( ) : void
return void
        public static void Run() 
        {
            // ExStart:PrintDiagramVisXPSPrinterAPI
            // The path to the documents directory.
            string dataDir = RunExamples.GetDataDir_Print();

            // Load source Visio diagram
            Diagram diagram = new Diagram(dataDir + "Drawing1.vsdx");
            
            // Specify the name of the printer you want to print to.
            const string printerName = @"\\COMPANY\Brother MFC-885CW Printer";

            // Print the document.
            XpsPrintHelper.Print(diagram, printerName, "My Test Job", true);
            // ExEnd:PrintDiagramVisXPSPrinterAPI
        }
    }
PrintDiagramVisXPSPrinterAPI