Printing from a Windows Service

20,167

The point is not how to print from a windows service or from an application, if you don't want any user interaction to be required you have to specify all print parameters without any need to show a print dialog ( which you can't because a windows service has no access to the UI ).

see here: http://msdn.microsoft.com/en-us/library/system.drawing.printing.printdocument.aspx

Share:
20,167
chriszero
Author by

chriszero

C#, Java, C/C++ Automating buildings

Updated on May 13, 2020

Comments

  • chriszero
    chriszero almost 4 years

    How can I printing a document on a specific printer from a Windows-Service without the need of any user-interaction?

    A string, or a text-file. Maybe Crystalreport?

    Thanks.

  • Joe
    Joe about 13 years
    @david well, given he did admit that he doesn't understand that part of the question it's not unfair to say that his answer may not be correct. you're comment's a bit harsh. @pawan, i think the OP wants a method that will programatically and automatically print either via some event or other triggers that is not kicked off by the user. so whether the service is multithreaded or not is irrelevant in this case as david pointed out.
  • PawanS
    PawanS about 13 years
    @David, ya I didn't understand the question, but I tried to give answer to my level best.Still I'm learning... Don't worry, thatx for criticising me. A day come when I'll answer better than u. @joe... thanku, next time I try to understand the question before answering.
  • apdevelop
    apdevelop about 11 years
    Unfortunately, printing from windows services is not recommended officially: Discussion.
  • Santosh
    Santosh about 2 years
    If someone comes here looking for the blog post on MSDN linked above, here is the updated link to it: docs.microsoft.com/en-us/archive/blogs/dsui_team/…