Active Topics Memberlist Search Help | |
Register Login |
Using PDF reDirect | |
EXP Systems Forum : PDF reDirect : Using PDF reDirect |
Topic: Printing freezes when desktop locked | |
Author | Message |
lovetski
Newbie Joined: 18 Apr 06 Location: Russian Federation Posts: 30 |
Topic: Printing freezes when desktop locked Posted: 18 Apr 06 at 6:01AM |
Hi. We've installed PDF reDirect 2.1.9 on a Windows 2003 server SP1. A user is logged onto the server and a program is running that prints to approximately 20-30 PDF reDirect batch printers. The desktop is locked after 5 minutes of inactivity (I mean the following: Windows dispalys "Hit Alt+Ctrl+Del to unlock the workstation. Blah-blah-blah..."). PDF reDirect seems to stop printing when the desktop is locked. All printers are set up to show progress bar. We are going to test the program with this option switched off. Can anyone confirm the reported behaviour? -- |
|
IP Logged | |
Michel_K17
Moderator Group Forum Administrator Joined: 25 Jan 03 Posts: 1673 |
Posted: 19 Apr 06 at 1:53AM |
Hi,
I have not tested this particular configuration (running while locked), but I'll give it a try tomorrow and see if I can duplicate the problem. My server kept crashing last week (traced to a bad memory module) and I have finally completed a rebuild, but I am still re-installing all the software, including PDF reDirect Pro. Cheers! Michel. |
|
IP Logged | |
lovetski
Newbie Joined: 18 Apr 06 Location: Russian Federation Posts: 30 |
Posted: 22 Apr 06 at 8:16AM |
Hi, I've tested the configuration on a test Windows XP computer with 50 or 100 PDF reDirect batch printers, and it's easily reproduceable. We've created a macro in a Word document (http://www.mml.ru/~alovetski/pdfredirect.zip) to print the current document on all PDF reDirect printers several times (500 times in the file above). It's based on your example of a class controlling PDF reDirect printers programmatically. The macro is named "printit()". When I start it, it prints one document at a time, sometimes two. This is due to hardware productivity, I suppose. Then I lock workstation, wait some 5 minutes, then unlock it. I see that ten printers or more try to print simultaneously. Then many of them report "Error printing the document" and the files are not created. Further print jobs are printed Ok. On our working server (Windows 2003 SP1) no errors are reported. The printing just stops for the time the main console session is locked. All documents seem to be generated after the session is unlocked. But after printing some two or three thousands of documents the server blue-screens. MS KB article http://support.microsoft.com/?kbid=891722 describes the same codes we get. The blue screens came away after we stopped locking the workstation and using RDP access to server (terminal services client locks the session upon disconnecting or when the user minimizes it). I hope you will be able to reproduce the problem and fix it. Thank you for a great product. Andrew. |
|
Andrew.
|
|
IP Logged | |
Michel_K17
Moderator Group Forum Administrator Joined: 25 Jan 03 Posts: 1673 |
Posted: 22 Apr 06 at 2:58PM |
Hi Andrew,
Thanks for the update. Good stuff. I must admit that I had no idea that anyone would use the batch printer featue in such an intense fashion. (cool). Sorry for the delay in getting back to you. My parents are visiting this week, so I've been busy taking them all over town. Hopefully by tomorrow. Thanks for the sample code too: that will help. I noticed your russian url. Are you from Russia? Your english is excellent. Cheers! Michel |
|
IP Logged | |
Michel_K17
Moderator Group Forum Administrator Joined: 25 Jan 03 Posts: 1673 |
Posted: 23 Apr 06 at 4:22PM |
Hi Andrew,
Good news: I was able to duplicate the problem. In so doing, I fixed the bug that created the problem. My fault. However, while doing this, I found another major bug with the batch printer: in your code, you are sending a lot of printer jobs very quickly, and my code will miss some of them as it tries to keep up. I am fixing this error now (this may take a few days). The good news is that the fix should also improve performance quite a bit! Anyway, give me a few fays, and hopefully everything will be better. Cheers! Michel. |
|
IP Logged | |
lovetski
Newbie Joined: 18 Apr 06 Location: Russian Federation Posts: 30 |
Posted: 23 Apr 06 at 4:49PM |
Hi Michel, Thank you for rather a quick reply. Two days delay is not a big deal. Especially if you spent them with parents ;) It's no problem for us to wait a bit for a fix. I'm glad I helped you eliminate some bugs from the program. Andrew. |
|
Andrew.
|
|
IP Logged | |
Michel_K17
Moderator Group Forum Administrator Joined: 25 Jan 03 Posts: 1673 |
Posted: 24 Apr 06 at 1:03AM |
Hi Andrew,
Well, it was a bit simpler than I thought. Here is the revised (beta) fix for the program. Just unzip the file [here] and the problem you reported should be fixed. I did a change to your code too. I added a "Sleep 100" just before the ".Printout" command, which seems to help the Windows Print Spooler service deal with the amount of printing you are trying to do very fast. The declaration for the sleep command is: Private Declare Sub Sleep Lib "kernel32" (ByVal dwMilliseconds As Long) Another solution is to go into the Batch Printer Properties, and change the "Spool" setting to "Print directly to the printer" which should help provide a more orderly situation. Either way, I found that if I print to the same printer very quickly, I would not lose a PDF file if I added the sleep command. (for example, sometimes I would get 18 PDF files when I was expecting 20). Let me know if you experience any more problems. Thank you for pointing out the bug. Michel |
|
IP Logged | |
lovetski
Newbie Joined: 18 Apr 06 Location: Russian Federation Posts: 30 |
Posted: 24 Apr 06 at 5:44AM |
Hi, Thank you very much for a fix. It seems to work and really fix the problem with desktop locked. Thank you for pointing out another problem "not all files printed". I submitted a bug report concerning it. 1. Your idea with 100 ms does not help in my environment. 2. I can change my test code (insert a pause of 100 ms or greater), but I cannot change a third-party printing program that we will use to print to batch printers. 3. As far as I see, the problem is on PDF reDirect side, not Windows spooler. In my tests Windows Event log shows that two documents were printed on two printers. Nevertheless none of them appeared as PDF files. The Log_CA.txt file shows some errors concerning the first document. And no traces of the other document at all. Edited by lovetski |
|
Andrew.
|
|
IP Logged | |
Michel_K17
Moderator Group Forum Administrator Joined: 25 Jan 03 Posts: 1673 |
Posted: 25 Apr 06 at 12:05AM |
Hi Andrew,
I see what I did wrong. I have fixed the code [here] which should fix the problem completely. And, as you requested, you do not need the "Sleep" command anymore. Let me know if that works better. Cheers! Michel. |
|
IP Logged | |
lovetski
Newbie Joined: 18 Apr 06 Location: Russian Federation Posts: 30 |
Posted: 12 May 06 at 3:15PM |
Hi Michel, Sorry for a long delay. We finally fully tested the fix. Now all files are printed. Thank you very much! |
|
Andrew.
|
|
IP Logged | |
Michel_K17
Moderator Group Forum Administrator Joined: 25 Jan 03 Posts: 1673 |
Posted: 13 May 06 at 11:04AM |
Great! Thanks for letting me know. I will add that fix to v2.1.10.
|
|
IP Logged | |
Forum Jump |
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot delete your posts in this forum You cannot edit your posts in this forum You cannot create polls in this forum You cannot vote in polls in this forum |