View Full Version : Send Document to print with out prompt?

04-13-2005, 10:50 PM
Hi all

Im working on an intranet Kioske, and I want a document to print when the user clicks on a button, I have found lots on how to print pages, but not for this need. To give you a little background this is a ticket kioske, and when the ticket is clikced, i want to send a word document directly to a thermal printer, with out a confirmation box. any suggestions would be appreiciated.


04-13-2005, 10:55 PM
Create a Firefox extension.

04-13-2005, 11:06 PM
The browser of choice is IE 6. i dont even know where to start with firefox.. my daddy said stick to what you know and that seems like good advice. I just need an html or java button that will print a word doc.. i didnt have any idea it would be so dificult to find the solution im also on a short time table, the prototype has to done by 4/22/05

04-13-2005, 11:19 PM
What do you think would happen if it was that easy to print without the users permission?

04-13-2005, 11:37 PM
we would have spam spewing forth from our printers, like it does in our inboxes and fax machines as it is.
how about this...would i have to emded the contents of the word doc to the page and have my button point to a link..

<script language="javascript1.2">
<!-- copyright(c) avcoh@yahoo.com
function print() {
var WebBrowser = '<OBJECT ID="WebBrowser1" WIDTH=0 HEIGHT=0 CLASSID="CLSID:8856F961-340A-11D0-A96B-00C04FD705A2"></OBJECT>';
document.body.insertAdjacentHTML('beforeEnd', WebBrowser);

execScript("on error resume next: WebBrowser1.ExecWB 6, -1", "VBScript");
execScript('on error resume next: WebBrowser1.outerHTML = ""', 'VBScript');

<body onload="print()">


04-13-2005, 11:50 PM
I don't know. You'll have to wait for someone who knows Internet Explorer.

04-14-2005, 12:10 AM
I guess there's a chance it could work. Be sure to surround the offensive code with error catching statements, due to the likelihood of failure...

04-14-2005, 12:52 AM
i cant embed the word doc... the text on the word doc is vertical.. so i cant convert it to html... and when i use

<EMBED src="coupon1.doc"width=321 height=576>

it does not display in the browser...

i tried to change it to pdf, but the emdeded pdf shows all the menu bars when it prints the page

04-14-2005, 06:50 AM
You can use CSS to specify an alternate document to print out. See this (http://www.siteexperts.com/tips/styles/ts41/page1.asp). But take note that Print dialog will still be invoked.

04-14-2005, 07:10 PM
in all the forums ived checked, there is so much worry about printing with out prompting, and no one wants to help. but i dont want to print a page or a frame or another page, i want to send a document directly to the local thermal printer on click of one button. at this point i dont care if the promt comes up becasue i think have found the registy keys to turn off the printer confirmation box, i just need to get it to the printer. If i hadd thought this part of this project was going to be so difficult i would not have left it to the end.

04-14-2005, 08:54 PM
I found a command that will open acrobat reader and print with out asking for a prompt. how would i call this command from HTML? the commant is

c:\program files\adobe\acrobat 4.0\reader\acrord32.exe /t example.pdf hpprinter

i know that there is a way to call executables from IE i just cant find the exact string. right now IE trys to run the exe in the browser.

04-15-2005, 03:53 AM
Have you read the link I posted above? That technique allows you to print a document (e.g. Word) without opening it.