Do you own a Debenu Quick PDF Library 12/11/10/9/8/7? Upgrade to Debenu Quick PDF Library 13!

Foxit Quick PDF Library

Frequently Asked Question:

Return to FAQ Index

Check to see if printing was successful

Question

After using PrintDocument to print a PDF how can I check to see if the document was actually sent to the printer and printed successfully?

Answer

The PrintDocument function will tell you if the library was able to successfully send the document to the printer, but it can't tell you if the printer actually prints the document. There isn't any other features in Quick PDF Library that will provide you with this information either.

The best way to find out if a document has been printed is to query the print queue on Windows. Here's a starting point from StackOverflow:

EnumPrinters to get the list of printers, EnumJobs to get a list of jobs for that printer. GetJob to get info on a specific job and SetJob to change the settings for that job (pause or cancel it)

See more in the Printing and Print Spooler References

.NET has the PrintQueue and PrintServer classes.


© 2015 Debenu & Foxit. All rights reserved. AboutBuyContactBlogNewsletterSupportFAQProduct UpdatesForum