Automate Webform Printing

G

Guest

Hi. I have a webform which I need to print automatically to a specific
printer once it is opened. I've searched all around but I can't find the
code to achieve ths. Basically I assume I just some code in the Page_Load
event that fires to print the webform when it loads.

Could someone please assist me? Thanks.
 
T

tomBond

Hi, Mike.
Sorry to say, but you assume wrong.
Javascript has window.print() but maybe this wouldn't do for you?
Serverside printing is whole lot more complicated thing and requiers
plenty of code. For example, if the code executes on the server i
Canada and you're located in Miami, how would the server be aware o
the printers installed to your local computer? Even if the cod
executes on your pc's www-service, you still are a client to th
application because you interact with it via browser.
More to think of: if the code would execute on your pc's www-service
it should be executed under aspnet-account while you're bein
authenticated as yourself. Since this is true, you would have to gran
aspnet account rights to printers installed to computer. And i
printers happen to be network printers, how would you grant to an loca
account rights to another network server? Since your aspnet accoun
isn't a domain or workgroup account, it can't be done. One wor-aroun
might be to impersonate the account so that it has privileges t
network printers, but it requires some amount of extra coding and cod
examples of doing this exists in the net.
Cheers,
-tom


-
tomBon
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top