Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people, just like you, are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
Solved

How to configure a local PC (for Kiosk use) ASP.NET web page to print without displaying the Printer Dialog

Posted on 2014-04-23
2
1,060 Views
Last Modified: 2014-04-24
We have a handful of computers set up as "Kiosk" type stations for customers to sign into our facilities.  So, we have full control of the computer the web page is displayed on.  The page is not for general consumption by the Internet.  It's on 14 of our local PCs.

With that stipulation, how can I get a web page (.aspx or .html I don't care) to print a confirmation number without displaying the print dialog first?

I've Googled my fingers raw and have found 29 variations of this:

<script type="text/vbscript">   
Sub print()   
        OLECMDID_PRINT = 6   
        OLECMDEXECOPT_DONTPROMPTUSER = 2   
        OLECMDEXECOPT_PROMPTUSER = 1   
        call WB.ExecWB(OLECMDID_PRINT, OLECMDEXECOPT_DONTPROMPTUSER,1)   
 End Sub   
 document.write "<object ID='WB' WIDTH=0 HEIGHT=0 CLASSID='CLSID:8856F961-340A-11D0-A96B-00C04FD705A2'></object>"  
</script>  

<body onload="window.print();">

Open in new window

... which I was not able to get to work.  

That script breaks the page and nothing prints, no dialog, no nothing.
If I remove that script then the page prints, with the dialog.

I just want to print the page, instantly, with no dialog.  Our customers just don't know what to do when a dialog pops up.  It's sad, but I have to work with it.

Thanks.  ;-)
0
Comment
Question by:megnin
2 Comments
 
LVL 18

Accepted Solution

by:
dj_alik earned 500 total points
ID: 40019669
You can do it with taking support of active x controls.

printing at client side without print dialog box
http://www.daniweb.com/web-development/aspnet/threads/200452/printing-at-client-side-without-print-dialog-box
0
 
LVL 1

Author Closing Comment

by:megnin
ID: 40019720
Well, thanks for the link to a forum.  The suggested solutions I found there were the same as the one in my OP that I said I could not get to work.  

The machines it will be running on are Windows XP, but the machine I'm developing and testing on is Windows 7 / IE 10.  

I don't know if that solution no longer works in Windows 7 / IE 10.  I just remotted into one of the XP machines and confirmed that it doesn't work in either OS.

I'm not going to waste any more time perusing it.  They can just learn to click the Print button on the dialog like everyone else.
0

Featured Post

Master Your Team's Linux and Cloud Stack!

The average business loses $13.5M per year to ineffective training (per 1,000 employees). Keep ahead of the competition and combine in-person quality with online cost and flexibility by training with Linux Academy.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Introduction HyperText Transfer Protocol (http://www.ietf.org/rfc/rfc2616.txt) or "HTTP" is the underpinning of internet communication.  As a teacher of web development I have heard many questions, mostly from my younger students who have come to t…
It’s a strangely common occurrence that when you send someone their login details for a system, they can’t get in. This article will help you understand why it happens, and what you can do about it.
This video teaches users how to migrate an existing Wordpress website to a new domain.
Use Wufoo, an online form creation tool, to make powerful forms. Learn how to selectively show certain fields based on user input using rules to gather relevant information and data from your forms. The rules feature provides you with an opportunity…

809 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question