0

Is it possible to create a windows service to know when a print request has been made and to know the status( Pending ,working ,completed etc.) Eg. Suppose there is an intranet .If a node computer is trying to print a document using a printer which is connected to a host , can I build an application to know when and which computer made the request using C#. Thank you !

Carey Gregory
  • 6,836
  • 2
  • 26
  • 47
  • Please clarify your question by being much more specific. What problem are you trying to solve? Do you want to know when a print job has been submitted to _any_ printer, or only specific printers? And are those printers only on the local machine or can they be anywhere on a network? I'm afraid I'll vote to close unless you can make this question a lot more answerable. – Carey Gregory Oct 26 '13 at 01:12
  • Thank you Carey .Lets say 10 computers are connected in a network(INTRAnet) and using 1-2 printers(Common for all computers) . I want to know when a printing request is made to one of the printers (For discussion lets assume there is just one printer) .2) IP address of the computer who made the request to print. 3)Date and time of the print request and pending status of the requests. Can I query printer get the IP etc. PrintQueue(http://msdn.microsoft.com/en-us/library/system.printing.printqueue.aspx) and class System.Printing in C# .Please let me know if more clarification is required.Thanks – Noob Programmer Oct 26 '13 at 12:16
  • Do you know the names of the printers you wish to monitor? Are you willing to use parts of the Win32 API not encompassed by .NET? – Carey Gregory Oct 27 '13 at 03:29

1 Answers1

0

Yes, it is. Please look at Print Spooler

Andriy Tylychko
  • 15,967
  • 6
  • 64
  • 112
  • Thank you so much , I really appreciate and it is very useful.I would like to know how can I use this in my code as this seems like the internal class and structure definitions. Thanks – Noob Programmer Oct 24 '13 at 13:04
  • the usage of print spooler in c# is mentioned in this thread: http://stackoverflow.com/a/20315926/1218508 – yurislav Mar 02 '16 at 20:37