Printing HTML

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Gerard Jonker

    Printing HTML

    Hello

    I am busy with a web-based sofware solution using PHP and MySQL.
    Is it possible to use a HTML document to produce a filled in form on
    paper without showing this HTML document on the screen?

    Gerard Jonker
  • Gerard Jonker

    #2
    Re: Printing HTML

    In article <bebee6$utn$1@n ewsg1.svr.pol.c o.uk>, Ben M
    <cee.plus@virgi n.net> wrote:
    [color=blue][color=green]
    > > Hello
    > >
    > > I am busy with a web-based sofware solution using PHP and MySQL.
    > > Is it possible to use a HTML document to produce a filled in form on
    > > paper without showing this HTML document on the screen?
    > >
    > > Gerard Jonker[/color]
    >
    > Use CSS to hide the form when viewing in screen media and display it in
    > print media.
    >
    > very brief example:
    >
    > in HTML:
    > ...
    > <head>
    > ...
    > <link rel="stylesheet " type="text/css" media="print" href="print.css ">
    > <link rel="stylesheet " type="text/css" media="screen" href="screen.cs s">
    > </head>
    > ...
    > <form class="printonl y" ...>
    > ...
    > </form>
    >
    > in print.css
    >
    > .printonly {display:block} ;
    >
    > in screen.css
    >
    > .printonly {display:none};[/color]

    Hello

    Thanks for your reply but can you please be more specific.
    My HTML document that has to be printed is placed into an Iframe that
    is not visible (dimensions zero). For the printing I try to use the
    following Javascript function:
    {
    document.nameof iframe.focus();
    document.nameof iframe.print();
    }
    but this does not work.
    If I am totally wrong please give me more details about your method.

    Gerard Jonker

    Comment

    Working...