| | |
printing at client side without print dialog box
Please support our ASP.NET advertiser: PostgreSQL or MySQL? Compare and contrast the two most popular open source databases
![]() |
•
•
Join Date: Apr 2009
Posts: 13
Reputation:
Solved Threads: 0
hi..actually i am developing a web application wherein i need to print barcodes at client side.
i have the PCL file that would print the barcode but the problem lies in printing at the client side and that too without opening the print dialog box.
can somebody help me with this issue??
what i exactly want is that the user clicks the button and barcode is printed at the default printer (with no dialog box)..
somebody help me ..
i have the PCL file that would print the barcode but the problem lies in printing at the client side and that too without opening the print dialog box.
can somebody help me with this issue??
what i exactly want is that the user clicks the button and barcode is printed at the default printer (with no dialog box)..
somebody help me ..
The printing behavior client side is handled by the browser and as far as I know you cannot change this behavior without writing a browser plugin.
According to a post I read it is possible for some browsers but I still do not recommend it:
http://www.webdeveloper.com/forum/sh...ad.php?t=85301
According to a post I read it is possible for some browsers but I still do not recommend it:
http://www.webdeveloper.com/forum/sh...ad.php?t=85301
•
•
Join Date: Jun 2009
Posts: 452
Reputation:
Solved Threads: 82
Try the solution given by Andy0000 in the following link: http://www.webdeveloper.com/forum/ar.../t-174029.html
But it may work in IE only.
But it may work in IE only.
•
•
Join Date: Jul 2009
Posts: 1
Reputation:
Solved Threads: 0
OK this worked for me, ASP and IE8. This will print to your default printer as soon as the page loads.
** NO PRINTER DIALOG POP-UP!!!!!!! **
** NO PRINTER DIALOG POP-UP!!!!!!! **
ASP.NET Syntax (Toggle Plain Text)
<body onload="window.print();"> <OBJECT Classid=CLSID:8856F961-340A-11D0-A96B-00C04FD705A2 height=0 id=WB width=0></OBJECT> <SCRIPT LANGUAGE="JavaScript"> DA = (document.all) ? 1 : 0 </SCRIPT> <SCRIPT LANGUAGE="VBScript"> sub print() OLECMDID_PRINT = 6 OLECMDEXECOPT_DONTPROMPTUSER = 2 OLECMDEXECOPT_PROMPTUSER = 1 'on error resume next 'IE4 object has different command structure if DA then call WB.ExecWB(OLECMDID_PRINT, OLECMDEXECOPT_DONTPROMPTUSER,1) else call WB.IOleCommandTarget.Exec(OLECMDID_PRINT ,OLECMDEXECOPT_DONTPROMPTUSER,"","") end if end sub 'This will be interpreted during loading. 'It will write out the correct webbrowser object depending 'on the browser version. To be sure it works, make sure you 'include this script block in between the body tags. if DA then 'this must be IE4 or greater wbvers="8856F961-340A-11D0-A96B-00C04FD705A2" else 'this must be IE3.x wbvers="EAB22AC3-30C1-11CF-A7EB-0000C05BAE0B" end if document.write "" </SCRIPT>
Last edited by peter_budo; Jul 17th, 2009 at 2:21 pm. Reason: Keep It Organized - For easy readability, always wrap programming code within posts in [code] (code blocks) and [icode] (inline code) tags.
![]() |
Similar Threads
- how to bring up print dialog box through php (PHP)
- Batch print barcode in ASP.NET, C#, on client side (ASP.NET)
- Link/icon to open print dialog box? (HTML and CSS)
- Print my switch to a dialog box (Java)
- print without dialog box using javascript (JSP)
- How do i print asp page on client side "only the contents" (ASP)
- Printing using Web Control Print button VB.NET (JavaScript / DHTML / AJAX)
- Printing using Web Control Print button. (ASP.NET)
Other Threads in the ASP.NET Forum
- Previous Thread: passing parameter to report
- Next Thread: how to count number of times file downloaded from my website
Views: 2181 | Replies: 5
| Thread Tools | Search this Thread |
Tag cloud for ASP.NET
.net 2.0 3.5 ajax appliances application asp asp.net beginner box browser businesslogiclayer button c# cac chat checkbox child class compatible complex content contenttype control countryselector courier database datagrid datagridview datalist deployment development dgv dialog dropdown dropdownmenu dynamic dynamically edit embeddingactivexcontrol feedback fileuploader fill findcontrol flash flv folder form gridview gudi identity iis image javascript languages list maps menu mobile mssql nameisnotdeclared novell opera order problem profile ratings redirect refer registration relationaldatabases response.redirect rows search security select serializesmo.table sessionvariables silverlight smoobjects software sql ssl tracking treeview typeof validatedate validation vb vb.net vista visual-studio visualstudio vs2008 web webapplications webarchitecture webdevelopment wizard xsl






