So, I have a WPF (.NET 4, MVVM, if it's important) app, that fetches some data from database, creates FixedDocument and then does one of these two things:
'print without preview': sends it to print without a preview;
or 'print with preview': displays it in DocumentViewer control and, on clicking 'Print', sends it to print;
On vast majority of workstations and printers this works just fine. However, there are some, that sometimes experience problems: printing doesn't work.
Reported symptoms:
- when executing 'printing without preview', all documents just stack up in printing queue and do not print;
- when executing 'printing with preview', preview's loading bar (which waits for data get and FixedDocument creation) stops and preview doesn't show;
- these problems are not consistent - they just come and go;
- the moment, when somebody connects to that workstation via TeamViewer, everything continues - all items in Printing Queue print out, loading bars continue, previews are shown etc. I know... ;
- I have never witnessed this problem myself - on my workstations everything works fine, the only way, to get to the problematic workstations is through TeamViewer;
- usually, workstation (or sometimes printer) restart fixes the issue - next printjob works fine;
Are there any theoretical clues?
How can this be, that TeamViewer unfreezes my processes?
One possibility could be: TeamViewer, when connected, opens some ports, that are necessary to get the data, but subj problem doesn't repeat constantly (which it would, if there were closed ports) and there are no DataGet timeouts (which there would be, if it was a network issue)...
I think the problem may be your printspooler. I have seen instances where the computers local printspooler stops responding when it was trying repeated to spool data to a particular printer, but that printer is either switched off, or on a network segment that may be down at that time. Basically, it is not finding the printer, then the local print spooler service stops responding.
This site (http://www.sysprobs.com/print-spooler-stopping-automatically-fix) could assist to ensure the spoolers service "recovery" is configured properly.
It could be that connecting with teamviewer acts similarly to logging into the computer, that causes the services to start/restart