Friday, April 10, 2009

Need to access printer directly?

some time there is a requirement of printing a hard copy of content on web pages,"window.print()" function works but only for the page which is being currently viewed.
If you want to print that data which not on the webpage then what's the way!
when i got stuck into this situation, i started looking for a solution at google.com
one of the approaches i came across is that to use System.Drawing.Printing.PrintDocument is the options .... if your application is on a Intranet and application users have access to the printer that is directly connected to the application server right!
check this article
A .NET Text Printing Class... That Works! by Karl Moore
"In simple words If you want to implement this on website that is hosted by a web hosting so, that not the solution for you"

What if
your requirnment is to print the content at the printer attached to the client PC then i found information about the microsoft activeX control nemed RSClientPrint, check this for issues.
Its basically a part of Microsoft sql server reporting service but can be used in custom application.


No comments: