tags:

views:

30

answers:

4

I am using php language. I project i have the application to be print, It contain two pages. According to the data available the page content may be change, so printout of first page end and second page starting content not to be proper.

So i want to know any other way is there, to separate the specific content to be printed from the second page ?

A: 

PHP cannot print, you must use Javascript for this. You can separate printable/not printable areas in a certain page with custom CSS linked with media="print" attribute.

fabrik
A: 

Assuming it's a web page that's being printed, look at the CSS page-break-before attribute.

pagebreak

Pete
+4  A: 

You can't do it using PHP (it just outputs data), but CSS has an attribute called page-break-after that you may use.

#someElement {
    page-break-after: always;
}

There are also page-break-before and page-break-inside. See http://www.w3.org/TR/CSS2/page.html#page-break-props for more information.

Daniel Egeberg
I never knew about this, very interesting :) +1
RobertPitt
Super let i check and tell...
Karthik
A: 

I applied all the css method, but not get proper solution. I manually calculated and left the space for this depending on the condition. So i solve this problem with correct result.

Thanks for everyone those who guide and answer for this issue.

Karthik