简体   繁体   中英

Capture print errors with System.Drawing.Printing.PrintDocument

The application my team is working on is developed using WPF & ,NET 4.0. The application also communicates with thermal printer connected to PC (like the ones used in malls, but its not a POS system). We only have 1 printer connected to the PC.

The application connect to printer and the output is often successful without any issues and parallel we save the data into the DB (SQL Server 2008 and going to SQL Server 2012).

On a very rare occasions the printout is not available but the data is saved to DB.

Is there any way to check or capture the printer related issue when we face this type of problem?

Thanks in advance.

Please Check whether your drivers are up to date. And use debugging to check whether an error occurs when executing the code. for this you can use try catch blocks which throws exceptions.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM