Professional Web Applications Themes

printing a page - PHP Development

I haven't figured where to post this. I'm working in PHP so I thought I would try here. I have four pieces of information I want to display -- each is variable number of lines. For viewing, I want it to be a long, narrow display so that you only need to scroll down to see everything. So it will be a table with 4 rows. When printing though, I want it to be shorter so that everything will usually fit on one page. For that, I need rows 2 and 3 to be side by side. The equavalent of ...

  1. #1

    Default printing a page

    I haven't figured where to post this. I'm working in PHP so I thought I
    would
    try here.

    I have four pieces of information I want to display -- each is variable
    number of lines. For viewing, I want it to be a long, narrow display so
    that you only need to scroll down to see everything. So it will be a table
    with 4 rows.

    When printing though, I want it to be shorter so that everything will
    usually fit on one page. For that, I need rows 2 and 3 to be side by side.

    The equavalent of what I want is
    viewing
    <table><tr><td>stuff1</td></tr><tr><td>stuff2</td></tr><tr><td>stuff3</td></
    tr><tr><td>stuff4</td></tr></table>

    printing
    <table><tr><td>stuff1</td></tr><tr><td>stuff2></td><td>stuff3</td></tr><tr><
    td>stuff4</td></tr></table>


    I've used media type on CSS to make printed output look different from
    displayed output but for the life of me, I cannot figure out how I can get
    php to render this page so that it will print side by side when printing.

    Anyone have any ideas?

    Thanks,
    Greg




    Greg Brewer Guest

  2. #2

    Default Re: printing a page


    "Greg Brewer" <GregBrewer.net> schreef in bericht
    news:40c3ab6e$0$444$a726171bnews.hal-pc.org...
    > I haven't figured where to post this. I'm working in PHP so I thought I
    > would
    > try here.
    >
    > I have four pieces of information I want to display -- each is variable
    > number of lines. For viewing, I want it to be a long, narrow display so
    > that you only need to scroll down to see everything. So it will be a
    table
    > with 4 rows.
    >
    > When printing though, I want it to be shorter so that everything will
    > usually fit on one page. For that, I need rows 2 and 3 to be side by
    side.
    >
    > The equavalent of what I want is
    > viewing
    >
    <table><tr><td>stuff1</td></tr><tr><td>stuff2</td></tr><tr><td>stuff3</td></
    > tr><tr><td>stuff4</td></tr></table>
    >
    > printing
    >
    <table><tr><td>stuff1</td></tr><tr><td>stuff2></td><td>stuff3</td></tr><tr><
    > td>stuff4</td></tr></table>
    >
    >
    > I've used media type on CSS to make printed output look different from
    > displayed output but for the life of me, I cannot figure out how I can get
    > php to render this page so that it will print side by side when printing.
    >
    > Anyone have any ideas?
    >
    > Thanks,
    > Greg
    >
    >
    >
    Greg,

    When the user presses the print button ( or when the javascript function
    window.print() is called) the page gets printed. All of this is on the
    client machine and the current (the 'viewing') HTML will be printed. My
    guess is to make an extra step and create a second page with the 'printing'
    HTML.

    Add a 'print' button on the viewing HTML and when clicked show the printing
    page and let the user print the page through the browser.

    or

    add a hidden iframe and set the src attribute to the printing page. When the
    user hits your printing button on the viewing HTML call
    doent.iframe_id.print(); in javascript and the printing page will be
    printed.

    As you see the actual printing is done in javascript so for further help on
    this subject you should go to a javascript newsgroup.

    HTH rob


    Rob Guest

Similar Threads

  1. Master Page printing/pdf bug
    By Christelle_Humbert@adobeforums.com in forum Adobe Indesign Macintosh
    Replies: 1
    Last Post: September 18th, 12:59 PM
  2. Printing full page
    By Rainer Langohr in forum Macromedia Flex General Discussion
    Replies: 4
    Last Post: April 19th, 05:07 PM
  3. Printing Dynamically Insantiated MovieClips (multi-page printing)
    By :: e1 :: webforumsuser@macromedia.com in forum Macromedia Flash Actionscript
    Replies: 1
    Last Post: February 9th, 08:09 AM
  4. Printing to fit page
    By damionb. in forum Macromedia Flash Actionscript
    Replies: 0
    Last Post: February 8th, 02:10 PM
  5. Printing Different Pictures on One Page
    By Richard Haasnoot in forum Adobe Photoshop Elements
    Replies: 11
    Last Post: September 13th, 02:04 AM

Bookmarks

Posting Permissions

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

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139