Need sample code server side printing

  • Thread starter Thread starter Peter Kaufman
  • Start date Start date
P

Peter Kaufman

Hi,

Subject line says it all except VB.NET preferred, but C# would be okay
too.

Thanks a lot,

Peter
 
The Server cannot print - you'll need to use the client (such as JavaScript). check the "print" function in any JS reference

This is for security reasons - you wouldn't want a user to load up a page, and then the server takes over the printer

Tim Stal

----- Peter Kaufman wrote: ----

Hi

Subject line says it all except VB.NET preferred, but C# would be oka
too

Thanks a lot

Pete
 
By its very nature, server side code can't print. The server has no
user interface, which includes printing.

Write the output to a file and then have the user/admin print it
themselves when they need to.

Neil
 
I don't think that's strictly the case; if you wrote code on the server to
do printing (e.g. http://www.c-sharpcorner.com/Printing.asp) and you gave
your ASP.NET worker process permissions (or did impersonation) to use the
printer, I don't see why it wouldn't work.

That said, yes, you really want to think through the security implications.


--
Thanks,

Eric Lawrence
Program Manager
Assistance and Worldwide Services

This posting is provided "AS IS" with no warranties, and confers no rights.


Tim Stall said:
The Server cannot print - you'll need to use the client (such as
JavaScript). check the "print" function in any JS reference.
This is for security reasons - you wouldn't want a user to load up a page,
and then the server takes over the printer.
 
Back
Top