thanks!
For anyone else following along, this is the code for the test. The sample application supplied is duplicated into two console app projects both of which point to identical printers and identical files in order to make a fair comparison. Tests were made of older .doc and also .docx files.
The ONLY difference between projects is that of which dll is used.
The printer settings have to be set because we use duplex. They are then cached in a variable.
XPS is not an option because we run XP machines but still wouldn’t explain the speed difference.
Creating our own renderer as is referred to in other topic answers is irrelevant in this case because it is a like for like comparison between versions of Aspose.Words and how they print.
Also irrelevant is network speeds since the rendering is being run on the same machine to the same printers. The timings were run multiple times and had the same results.
We have 30,000 items to print so time is very important!
///
/// Prints the old style word doc.
///
/// The filename.
/// The print server.
/// Name of the printer.
private static void PrintOldStyleWordDoc(string filename, string printServer, string printerName)
{
LogToConsole(string.Format(@"PrintOldStyleWordDoc: Getting printer settings for printer {0} / {1}", printServer, printerName));
_setting = GetPrinterSettings(printerName, false, Duplex.Simplex, 1, printServer);
LogToConsole(string.Format("PrintOldStyleWordDoc: Loading {0}", filename));
Aspose.Words.Document doc = new Aspose.Words.Document("testdoc.doc");
LogToConsole(string.Format(@"PrintOldStyleWordDoc: Starting to print {0} on printer {1} / {2}", filename, printServer, printerName));
// Enable the page to render itself before printing
doc.UpdatePageLayout();
StartTimer();
doc.Print(_setting);
EndTimer();
LogToConsole(string.Format(@"PrintOldStyleWordDoc: Finished printing {0} on printer {1} / {2}", filename, printServer, printerName));
LogTime();
LogToConsole("-----------------------------");
}
///
/// Prints the new style word doc.
///
/// <param name="filename">The filename.
/// <param name="printServer">The print server.
/// <param name="printerName">Name of the printer.
private static void PrintNewStyleWordDoc(string filename, string printServer, string printerName)
{
LogToConsole(string.Format(@"PrintNewStyleWordDoc: Getting printer settings for printer {0} / {1}", printServer, printerName));
_setting = GetPrinterSettings(printerName, false, Duplex.Simplex, 1, printServer);
LogToConsole(string.Format("PrintNewStyleWordDoc: Loading {0}", filename));
Aspose.Words.Document doc = new Aspose.Words.Document("testdoc.doc");
LogToConsole(string.Format(@"PrintNewStyleWordDoc: Starting to print {0} on printer {1} / {2}", filename, printServer, printerName));
// Enable the page to render itself before printing
doc.UpdatePageLayout();
// Print the document.
Aspose.Words.Rendering.AsposeWordsPrintDocument printdoc = new Aspose.Words.Rendering.AsposeWordsPrintDocument(doc);
printdoc.PrinterSettings = _setting;
StartTimer();
printdoc.Print();
EndTimer();
LogToConsole(string.Format(@"PrintNewStyleWordDoc: Finished printing {0} on printer {1} / {2}", filename, printServer, printerName));
LogTime();
LogToConsole("-----------------------------");
}