A utility class that converts a document to XPS using Aspose.Words and then sends to the XpsPrint API.
Example #1
0
        public static void Run()
        {
            //ExStart:PrintDocViaXpsPrint
            // The path to the documents directory.
            string dataDir = RunExamples.GetDataDir_RenderingAndPrinting();
            // Open a sample document in Aspose.Words.
            Document document = new Document(dataDir + "TestFile.doc");

            // Specify the name of the printer you want to print to.
            const string printerName = @"\\COMPANY\Brother MFC-885CW Printer";

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