Hello
I 'm new member and this first question :)
I 'm being develop ActiveX control which embedded in html page to
control printing in client side with .NET 3.5 , C#
control printing in client side with .NET 3.5 , C#
My diagram shown this.
Printer <-- Client Web Browser <---> Web Server
Requirement is print current webpage with single click. No print dialog
, no confirm and can select printer to print by name , Can setup paper size , print quality etc.
, no confirm and can select printer to print by name , Can setup paper size , print quality etc.
At this time, I don't understand how to access in current page? I see System.Drawing.Printing.PrintDocument have Graphic element.
This my idea . I 'm will capture current page in image file (but now is not know how what to do :P )
and create PrintDocument from that image file. Good idea or bad please explain ?
Thanks and regards.
Ps. sorry for english sentence if make you difficult to read. I 'm not expert in english skill. I hope will better in next time :)
Settavut DindangPosted Apr 26, 2012, 10:39 AM
I road your article . Umm. but is not solution for me with original reason.
I will be explain why i need to use ActiveX instead javascript function.
1. Can select printer to do print and must not change default printer setting.
2. Can query installed printer , setup paper size
with top reason. No any way if you use only javascript because it 's will be access in
client resource.
Thanks and regard :)
SenthilkumarPosted Apr 26, 2012, 1:24 AM
http://www.c-sharpcorner.com/UploadFile/skumaar_mca/media-css-for-print-the-web-page-in-customized-format/
Settavut DindangPosted Apr 26, 2012, 12:17 AM
window.print is not working with my requirement.
Ex. No print dialog , can select printer by name
In addition , Browser is Internet Explorer only.
Thanks for reply :)
SenthilkumarPosted Apr 25, 2012, 11:38 PM
If you use the browser then you can use the javascript.
Just you need to call the window.print() function which will give you the print out the current page.
If you want to take the print of the selected portion in the web page like only table not with the header and footer then
you need to use the media style css. Where you can set the display none to the elements which should not be in the print out.