PDA

View Full Version : HOW to insert page breaks in printing a report using php


garrisonian14
05-06-2008, 08:02 AM
Hi,

I am generating a report that contains data of different clients. I print this report using window.print() method when user clicks on print button.
What i need to do is to print data of each client on separate page. So i want to put page breaks in print using php conditions to identify that data for next client has started. can any body please help me? How can i put page breaks.
Will it be done using CSS or there is some php or javascript function that can do the job.

Please reply me. It is very urgent.

Thanks in anticipation.
Ali.

mlseim
05-06-2008, 12:59 PM
I've used this before:

style="page-break-before: always"

Here's the write-up.
http://www.w3schools.com/css/pr_print_pagebb.asp

Not sure if this is considered deprecated code.

garrisonian14
05-06-2008, 01:07 PM
Thanks man, I got this thing using google search too. Thanks for your reply , i am trying these options , hopefully i ll manage to solve the problem.