Serwer Printing

G

Guest

I'm developing ASP.NET C# application. I need to implement server-side
printing for asp.net form on specified in DB printer. I know how to print it
on Client-side (window.print()). How can I print the same page (form) on
server side?

If I can use PrintDocument class, then how to pass dynamically generated web
form.
If I have to use client-side, then can I specify printername when printing
on client-side to avoid unnecessary dialog for printer selection?

Thanks for any help

Jacek
 
R

Rick Strahl [MVP]

Hi Jacek,

WinForms printing works through GDI+ since the whole page is actually a
painted onto a canvas you can do that.

On the Web that doesn't really work because the server generates HTML (text
only) - the browser on the client actually renders the HTML so there's
nothing that you can print of.

That said there are ways that you could do this if you must:

Load the HTML into a Web Browser control object (or
InternetExplorer.Application) and print from there
Generate your output into PDF and print that (using Crystal, ActiveReports
or some other third party tool)

If you really must print on the server, then the latter might be the
cleanest looking approach.

Hope this helps,

+++ Rick ---

--

Rick Strahl
West Wind Technologies
http://www.west-wind.com/
http://www.west-wind.com/weblog/
http://www.west-wind.com/wwThreads/
 
G

Guest

Thank You very much Rick, You were a great help for me. I applied GDI
printing as You suggested, but when customers wanted client printing (HTML
from browser), I wanted to unify that, now I know what I can do next ;)

Thank You once again

Jacek
 

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

Staff online

Members online

Forum statistics

Threads
473,995
Messages
2,570,230
Members
46,816
Latest member
SapanaCarpetStudio

Latest Threads

Top