Whether is it possible to indicate the printer to next page in php?
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 ?
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.
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.
Assuming it's a web page that's being printed, look at the CSS page-break-before
attribute.
pagebreak
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.
精彩评论