Massive speed issue when printing between version 11.5 of Words and version 10.2

We have just reached the printing phase of our project in which 30,000 statements are to be printed. When I created my prototype and the initial version of our system last year, the printing speed was slow but just acceptable. We haven’t had to print anything since that time as all our other jobs just merge and convert documents to pdf files held on tables but we have now reached the printing stage and our first mailmerged print took over 7 minutes!

After investigating into this, I have created a simple version of one of our documents and two console applications. These applications use exactly the same documents and exactly the same print methods with timings shown. Using the standard print method “document.print()” the time difference between the two is 13.687 seconds on v10.2 and 2 minutes ,17 seconds, 845milliseconds on v11.5!

Our real application is run as a distributed service on a mixture of XP and varying windows versions so the XPS print method is not available (I couldn’t find the XpsPrint.dll even on my 2003 sp2 machine). You can see in the code that I started looking at it but when the dll turned out not to exist on my machine couldn’t proceed further.

We urgently need this fixed or an easy workaround. I have attached the two projects & the sample documents for you to look at. There is also screen shots of the applications running so you can see at a glance what I am talking about

Thanks

Jon

tried printing with the 11.6 version of the DLL released today and it is even slower than the 11.5 one!

Please can you look at my attached sample & let me know what has gone wrong between the versions?

thanks

Hi Jon,

Thanks for your inquiry and sorry for the delayed response. I am working over your query and will get back to you as soon as possible.

Best Regards,

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("-----------------------------");
}

Hi Jon,

Thanks for your patience.

I tried printing both ‘testdoc.doc’ and ‘testdoc.docx’ with the latest version of Aspose.Words i.e. v11.6.0 and was unable to reproduce this performance issue on my side. Could you please try using the latest version of Aspose.Words on your side and let us know your findings then. You can download Aspose.Words for .NET version 11.6.0 from the following link:

https://downloads.aspose.com/words/net

I hope, this will help.

Best Regards,

Please see my previous comment on 8/2 - I tried the new dll as soon as it was released and the results are slightly slower. Please can you post the times for using BOTH of the test applications provided.

If you have only tried the 11.5 version then load up both of them, change the constants to point to a network printer and then run them.

The time differences have been included as a screenshot to prove the difference. As stated these are IDENTICAL programs running IDENTICAL versions of the documents but with SIGNIFICANT time differences when printing. I have included both versions of printing (print viewer and document.print() to eliminate that option.

Please do not suggest I try XPS printing or point me to the article about caching printer settings/writing my own renderer as they would be irrelevant given the samples provided.

Thanks

Jon

Hi Jon,

Thanks for your patience. We are checking with this scenario and will get back to you as soon as possible.

Best Regards,

Hi Jon,

Thanks for waiting and sorry for the delay.

You are absolutely right, I managed to reproduce the same problem as well.

It seem there has been quite a bit of a slow down with printing introduced in Aspose.Words 11.5. Behind the scenes the developer has been working on the issue linked to your other thread. He finished a preliminary fix which is suppose to improve printing speed with large documents and integrated this into the main codebase. We left the issue open in review for testing and to get feedback from customers.

It appears from your results the fix is not helping at all. It is a little confusing as when I tested the “beta” on my side during the month the printing speed was slightly improved. I will talk to the developer about this and try to find what has gone wrong. I will get back to you as soon as possible. Worse case, we will simply revert these changes in the next release.

Thanks,

Cool - by revert do you mean back to the 11.5 version (still sadly no use to us) or back to the 10.2 version? Is there any eta on when the developer is due to report back because as mentioned we have 30,000 statements to print off and there has been about 1000 improvements and bug fixes between the two versions…

Thanks

Jon

Hi Jon,

If the cause of the slow down cannot be identified then we will just revert that particular branch of code changes that the developer was working on. This means all other improvements made in previous versions will remain and the printing speed should go back to being as fast as previous versions.

Thanks,

hopefully it can be identified then because I cannot use the 11.5/6 version and have had to urgently revert my code to the 10.2 version just so our testers can print one off statements (it takes 7 minutes to print a single complete statement with the current versions!)

Thanks

Jon

Hi Jon,

Thanks for the additional information. Rest assured, we will keep you informed of any developments and let you know once your problem is resolved. We apologise for the inconvenience.

Best Regards,

Hi Jon,

Thanks for your inquiry.

After some testing we believe we have fixed the source of the problem and have integrated the fix. However that fix wasn’t quite done in time to be included in the Aspose.Words hotfix that was released a few days ago. Therefore I’m afraid it won’t be released until the end of the month.

In the mean time are you able to use Aspose.Words 11.4 (the version before the reported slow down) until the end of the month release? In other words, does 11.5 or 11.6 contain any major bug fixes that are required by you.

We apologise for any inconvenience.

Thanks,

Hi there,

That’s fine - we know the fix is coming in and at least I know what version I can go up to before the slowdown happened.

Obviously any additional improvements you can make to the printing speed before that nest release will be very much appreciated given the sheer number we have to print…

Thanks for your understanding. The proper fix which is in the code base should hopefully result in both increases in speed of printing many documents at once and with printing documents with many pages. I am looking forward to hearing the results on your side.

Thanks,

If you want, I can test out a pre-release dll to see how fast it prints. If it takes seven minutes again then you will at least know in advance!

Hello,

We are experiencing this same problem and it is negatively affecting a great deal of our clients. We will have an opportunity to roll out a fix on the 24th of this month. Is there any way I can get the fix ahead of the end of month timeframe?

Thanks,

Chad

Hi Jon, Chad,

Thanks for your inquiries.

We would very much like to give a release to test as soon as possible, however due to the release process being quite long (because it includes tasks such as obfuscation) I’m afraid we cannot build another release until the scheduled time at the end of the month.

We apologise for any inconvenience.

Thanks,

The issues you have found earlier (filed as WORDSNET-6739) have been fixed in this .NET update and this Java update.


This message was posted using Notification2Forum from Downloads module by aspose.notifier.

Hi there,

Just tested this out on the sample application used as part of this thread and the results unfortunately seem to be the same.

Attached are two screenshots showing the DLL print results and also the DLL in Visual Studio so that you can see it is set up correctly.

Please can you reproduce this again to confirm it at your end.

Regards,

Jon