I have some Delay to access My remote printer, a RICOH offimatic point.
I think this delay become from domain autentification.
When I call PrintDialog, this delay is about 3 to 5 seconds.
I use some .Net programs. Then when I print a report, delay becomes 4x the PrintDialog Delay (15-20 seconds).
Standard Programs (c++) get a 1x delay only.
When I open the window information for this printer, then no delay when print report.
I use a command to start Printer's Dialog when PC starts:
%windir%\system32\rundll32.exe Printui.dll,PrintUIEntry /o /n PrinterName
I maintain open this window for my Windos session. This solves problem for me.
Using Debug, I observe what code get delay on .Net:
PrintDialog, IsPrinterDefault,
New PrinterSettings, PrintDocument.Print
I think .Net releases each connection to remote printer after get information.
Then I test to forze "CachePrinter" using OpenPrinter API:
I call GetDefaultPrinter to get Default Printer Name before any "New PrinterSettings", then I call OpenPrinter to maintain Printer Session Cached.
Now, I get a unique 3 seconds delay when I print the first report or call PrintDialog.
Is this a correct solution to this problem ? I don't like use apis when I write net code.
Do you know someone configuration settings's for this printer to keep the connection alive ?