Hello all,
I'm embedding some support for batch emailing PDF reports in an application and as part of my processing, I call the enablePrinter function, generate the report to PDF, then email the PDF to a userlist.
I have noticed on reports that take a long time: somewhere between 10 and 30 seconds (I haven't figured out the exact time yet) I receive the error:
Printer not activated, error code -30. I know this isn't simply a problem with the report as it works until I place a sleep() command in the code after the enableprinter and before the report generation in order to simulate a long running report.
For reports that take under a certain amount ot time to generate, I receive no error. Is there a timeout setting for the enableprinter that disables the enabled printer after a certain period?
Any help would be appreciated,
Thanks.
Timeouts and the EnablePrinter function call
Hello,
Yes, there is a timeout setting for the EnablePrinter(). EnablePrinter() will activate the printer for 20 seconds, if printing starts after these 20 seconds printing will fail.
You need to call EnablePrinter() right before printing and better when catching the EnablePre() event of the driver.
Hope this helps.
Yes, there is a timeout setting for the EnablePrinter(). EnablePrinter() will activate the printer for 20 seconds, if printing starts after these 20 seconds printing will fail.
You need to call EnablePrinter() right before printing and better when catching the EnablePre() event of the driver.
Hope this helps.