This is a two-part question:
1.
The original .NET print classes (in System.Drawing.Printing) are not supported on the server side. (See http://msdn.microsoft.com/en-us/library/system.drawing.printing(VS.80).aspx )
I think that the newer XPS-based printing classes (in System.Printing) are supported on the server side, e.g. in ASP.NET apps and Windows Services, but I can't prove it. And Microsoft have not answered my questions about it.
Does anyone here know?
2
The new XPS-based printing will sometimes do an internal conversion to GDI. That is for cases where the only driver available is an old-style driver, even though the app is printing with the new printing classes. See http://msdn.microsoft.com/en-us/library/ms742418.aspx . Are the new classes safe for server-side use in that situation?
To clarify - this is entirely about the server printing stuff. For the purposes of this discussion, there is no web browser involved at all. A server, either windows service or asp.net, needs to directly print out a document, on a printer that is attached to the server.
Thanks.
As noted in my comment below, there is no supported solution for server-side printing in pure managed code.
But, Aspose have just released some code that lets you print XPS documents from managed code (successfully using PInvoke to call the XPS Print API). [For the record, I believe that Microsoft's intitial recommendation against using PInvoke to call XPS print was simply because it is a difficult API to interact with using PInvoke. But Aspose seem to have succeeded, which is good news, since it removes the need to involve separate any separate unmanaged DLL.]
All in all, the Aspose solution looks like the easiest fully-supported way to print complex documents from ASP.NET and Windows services.