Remote web app, local printer.

Discussion in 'Javascript' started by The Natural Philosopher, Dec 25, 2009.

  1. I am not sure this is even possible, but could someone tell me if there
    is a mechanism whereby pressing a button on the user screen, could
    directly invoke the users local print dialogue and send a pre-formatted
    page to a printer?

    Without printing the HTML page, for example.

    Assume users will set security settings to whatever is needful.


    I suspect this is a FAQ. And the answer is no..
     
    The Natural Philosopher, Dec 25, 2009
    #1
    1. Advertising

  2. The Natural Philosopher

    Evertjan. Guest

    The Natural Philosopher wrote on 25 dec 2009 in comp.lang.javascript:

    > I am not sure this is even possible, but could someone tell me if there
    > is a mechanism whereby pressing a button on the user screen, could
    > directly invoke the users local print dialogue and send a pre-formatted
    > page to a printer?



    Yes, use document.print()

    and format with CSS and something like:

    @media print {
    body {background-image:url('');background-color:#fff;}
    .noprint, .noprinttoo, #noprintmydiv {display:none;}
    }

    > Without printing the HTML page, for example.


    Why, what is wrong with html?

    > Assume users will set security settings to whatever is needful.


    No, I don't assume that or even think it is needful.

    > I suspect this is a FAQ.


    If you harbour such suspicion, it is wrong of you to ask this Q,
    as Usenet Netiquette expects you to first inspect the NG archive.

    Better read "the" NG FAQ:

    <http://www.jibbering.com/faq/>

    > And the answer is no.


    of "but could someone tell me" ?

    You figure that one out.

    --
    Evertjan.
    The Netherlands.
    (Please change the x'es to dots in my emailaddress)
     
    Evertjan., Dec 25, 2009
    #2
    1. Advertising

  3. Evertjan. wrote:
    > The Natural Philosopher wrote on 25 dec 2009 in comp.lang.javascript:
    >
    >> I am not sure this is even possible, but could someone tell me if there
    >> is a mechanism whereby pressing a button on the user screen, could
    >> directly invoke the users local print dialogue and send a pre-formatted
    >> page to a printer?

    >
    >
    > Yes, use document.print()
    >
    > and format with CSS and something like:
    >
    > @media print {
    > body {background-image:url('');background-color:#fff;}
    > .noprint, .noprinttoo, #noprintmydiv {display:none;}
    > }
    >
    >> Without printing the HTML page, for example.

    >
    > Why, what is wrong with html?


    You omitted the definite article. Nothing is wrong with HTML, but THE
    html is not what needs printing.

    Thanks. I'll look into that.
     
    The Natural Philosopher, Dec 25, 2009
    #3
  4. The Natural Philosopher

    Evertjan. Guest

    The Natural Philosopher wrote on 25 dec 2009 in comp.lang.javascript:

    > Evertjan. wrote:
    >> The Natural Philosopher wrote on 25 dec 2009 in comp.lang.javascript:
    >>
    >>> I am not sure this is even possible, but could someone tell me if
    >>> there is a mechanism whereby pressing a button on the user screen,
    >>> could directly invoke the users local print dialogue and send a
    >>> pre-formatted page to a printer?

    >>
    >>
    >> Yes, use document.print()
    >>
    >> and format with CSS and something like:
    >>
    >> @media print {
    >> body {background-image:url('');background-color:#fff;}
    >> .noprint, .noprinttoo, #noprintmydiv {display:none;}
    >> }
    >>
    >>> Without printing the HTML page, for example.

    >>
    >> Why, what is wrong with html?

    >
    > You omitted the definite article. Nothing is wrong with HTML, but THE
    > html is not what needs printing.


    Your "the" belongs to the substantive "page",
    not to the adjective HTML. ;-)

    It is not clear to me what you mean by not wanting to print the html page,
    do you want to print something unformatted?

    > Thanks. I'll look into that.



    --
    Evertjan.
    The Netherlands.
    (Please change the x'es to dots in my emailaddress)
     
    Evertjan., Dec 26, 2009
    #4
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Samuel Lee
    Replies:
    0
    Views:
    520
    Samuel Lee
    Nov 11, 2003
  2. JonnyD
    Replies:
    16
    Views:
    764
    Paul Clement
    Oct 31, 2005
  3. Replies:
    4
    Views:
    2,120
    Roedy Green
    Sep 1, 2005
  4. Steve G
    Replies:
    12
    Views:
    789
    Patricia Shanahan
    Aug 6, 2006
  5. Replies:
    5
    Views:
    147
Loading...

Share This Page