exact page breaks

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • pradeepjain
    Contributor
    • Jul 2007
    • 563

    exact page breaks

    I have 10-11 tables in an html page .I need to take a print out of this page .but few tables half part comes in next page . is there a way to give a page break so that i can limit number of entries in one page .say 2 per page .
  • hsriat
    Recognized Expert Top Contributor
    • Jan 2008
    • 1653

    #2
    The print media type in CSS may help you (not sure).
    Or you can create PDF of the page (search for some free library).

    Comment

    • Markus
      Recognized Expert Expert
      • Jun 2007
      • 6092

      #3
      You could use pagination? Otherwise, I'm not sure this question is PHP related.

      Comment

      • pradeepjain
        Contributor
        • Jul 2007
        • 563

        #4
        hey i used simple method and it worked !!!!

        since i had a count saying $i for a loop
        i used
        [code=php]
        if(($i % 2)==0)
        {
        print("<p style='page-break-before: always'></p> ");
        }
        [/code]


        so it gives a page break after 2 tables .But it will show up only while printing ... :) ...
        Last edited by Atli; Feb 16 '09, 06:47 PM. Reason: Added [code] tags.

        Comment

        • hsriat
          Recognized Expert Top Contributor
          • Jan 2008
          • 1653

          #5
          That seems to be a good choice!

          Comment

          Working...