Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 12 of 12
  1. #1
    New to the CF scene
    Join Date
    Apr 2005
    Posts
    6
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Send Document to print with out prompt?

    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.

    Tom

  • #2
    Senior Coder
    Join Date
    Jul 2004
    Location
    New Zealand
    Posts
    1,315
    Thanks
    0
    Thanked 2 Times in 2 Posts
    Create a Firefox extension.
    Forget style. Code to semantics. Seperate style from structure, and structure from behaviour.
    I code to specs, and test only in Firefox (unless stated otherwise).

  • #3
    New to the CF scene
    Join Date
    Apr 2005
    Posts
    6
    Thanks
    0
    Thanked 0 Times in 0 Posts

    firefox what?

    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

  • #4
    Senior Coder
    Join Date
    Jul 2004
    Location
    New Zealand
    Posts
    1,315
    Thanks
    0
    Thanked 2 Times in 2 Posts
    What do you think would happen if it was that easy to print without the users permission?
    Forget style. Code to semantics. Seperate style from structure, and structure from behaviour.
    I code to specs, and test only in Firefox (unless stated otherwise).

  • #5
    New to the CF scene
    Join Date
    Apr 2005
    Posts
    6
    Thanks
    0
    Thanked 0 Times in 0 Posts

    i know, i know

    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..

    <html>
    <head>
    <title>about:blank</title>
    <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');
    }
    -->
    </script>
    <style>

    </style>
    </head>
    <body onload="print()">

    </body>
    </html>

  • #6
    Senior Coder
    Join Date
    Jul 2004
    Location
    New Zealand
    Posts
    1,315
    Thanks
    0
    Thanked 2 Times in 2 Posts
    I don't know. You'll have to wait for someone who knows Internet Explorer.
    Forget style. Code to semantics. Seperate style from structure, and structure from behaviour.
    I code to specs, and test only in Firefox (unless stated otherwise).

  • #7
    Regular Coder
    Join Date
    Aug 2004
    Location
    codegoboom@yahoo.com
    Posts
    999
    Thanks
    0
    Thanked 0 Times in 0 Posts
    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...
    *this message will self destruct in n-seconds*

  • #8
    New to the CF scene
    Join Date
    Apr 2005
    Posts
    6
    Thanks
    0
    Thanked 0 Times in 0 Posts

    arg

    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

  • #9
    Supreme Master coder! glenngv's Avatar
    Join Date
    Jun 2002
    Location
    Philippines
    Posts
    11,075
    Thanks
    0
    Thanked 256 Times in 252 Posts
    You can use CSS to specify an alternate document to print out. See this. But take note that Print dialog will still be invoked.
    Glenn
    ____________________________________

    My Blog
    Tower of Hanoi Android app (FREE!)
    Tower of Hanoi Leaderboard
    Samegame Facebook App
    vBulletin Plugins
    ____________________________________

  • #10
    New to the CF scene
    Join Date
    Apr 2005
    Posts
    6
    Thanks
    0
    Thanked 0 Times in 0 Posts

    this is so frustrating

    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.

  • #11
    New to the CF scene
    Join Date
    Apr 2005
    Posts
    6
    Thanks
    0
    Thanked 0 Times in 0 Posts

    ah hah! or ah hmmm..

    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.

  • #12
    Supreme Master coder! glenngv's Avatar
    Join Date
    Jun 2002
    Location
    Philippines
    Posts
    11,075
    Thanks
    0
    Thanked 256 Times in 252 Posts
    Have you read the link I posted above? That technique allows you to print a document (e.g. Word) without opening it.
    Glenn
    ____________________________________

    My Blog
    Tower of Hanoi Android app (FREE!)
    Tower of Hanoi Leaderboard
    Samegame Facebook App
    vBulletin Plugins
    ____________________________________


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •