Menu

#458 Print List on more than one Page

open
nobody
None
5
2005-08-16
2005-08-16
No

Long lists should copy the page and column headers
and footers to all the printed pages.

Sample pages are for instance user-, individual-, family-,
source- etc. lists, search result lists and daily and
yearly calendar lists

Discussion

  • KosherJava

    KosherJava - 2005-08-16

    Logged In: YES
    user_id=634811

    Meliza,
    This is not complicated to implement.
    It will require that tables that you expect to print have
    proper HTML <thead>, <tbody> and optionally a <tfoot> tag.
    Also we will need to add some css for IE.
    Add to print.css:
    thead { display: table-header-group; }

    Make sure table has thead and tbody tags like this:
    <table border="0" align="center" width="100%">
    <thead>
    <tr>
    <th>Col #1 Header</th>
    <th>Col #2 Header</th>
    <th>Col #3 Header</th>
    <th>Col #4 Header</th>
    </tr>
    </thead>

    <tbody>
    <tr>
    <td>DATA 1</td>
    <td>DATA 2</td>
    <td>DATA 3</td>
    <td>DATA 4</td>
    </tr>
    ..... repeat 100 times to see effect (or better yet add
    to PGV ;) )
    </tbody>
    </table>

    I do not think that we need tfoot

    What I would like to do is add:
    @media print rules to the regular style.css and get rid of
    the print css or import the regular one into the print CSS.
    This way styles will only change in one place and only the
    few print specific changes will override the regular styles
    when printing. This willget rid of the icon borders that
    currently display when printing.
    If you can get started on the simple code mentioned earlier
    it would be great. I will try to play with the @media rules
    or importing the regular css into the print over this
    weekend. If not just leave it and I will get to it eventually ;(

     
  • KosherJava

    KosherJava - 2005-08-18

    Logged In: YES
    user_id=634811

    Can you explain what you mean about the page headers and
    footers? For example if the footer stated that there were
    300 people in the list would you really want this on every
    page? I think that that would look odd. Secondly can you
    explain what you mean by Page and Column headers? Typically
    all you would want repeated were the table column headers.

     
  • KosherJava

    KosherJava - 2005-08-18

    Logged In: YES
    user_id=634811

    I did some work on this in the indilist.php but it is not
    fully done. To do this properly, the way we have the table
    split into only one TR with 1 or more TDs with individuals
    split by <li> will pose problems with the way IE deals with
    theader. The proper way to do this would be to yse TDs doe
    every individual, with better styling such as alternating
    row colors. This would require a change in the way we
    display rows, because this way would require first splitting
    the lsits and than alternate paining the first cell in the
    first half, the first from the second half etc.

     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.