Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to add Page Break dyanamically to Print page?

There is one long in the content on the print page, but while we print the some content of the text cut down.

alt text http://img694.imageshack.us/img694/6766/printpage.jpg

please let me know , if there is any dynamic way to add page-break css. the content could be any thing.

like image 425
Wasim Shaikh Avatar asked Feb 25 '10 06:02

Wasim Shaikh


People also ask

Can I force a page-break in HTML printing?

You can use the CSS property page-break-before (or page-break-after ). Just set page-break-before: always on those block-level elements (e.g., heading, div , p , or table elements) that should start on a new line. Save this answer.

What is dynamic page-break?

Use. As soon as a page is full, SAP Smart Forms automatically triggers a page break. A page is full as soon as all output areas on this page are filled. Output to all output areas except the main window is truncated as soon as the area is full.

How do you code a page-break?

To suggest a page break, add <P style="page-break-before: always"> before the beginning of a new printed page. For example, if you place the following tags on a HTML page and print it using a compatible browser, you will end-up with three pages with the sample text.

What is page-break printing?

Page breaks are dividers that break a worksheet into separate pages for printing. Microsoft Excel inserts automatic page breaks based on the paper size, margin settings, scale options, and the positions of any manual page breaks that you insert.


1 Answers

You might also just want to prevent page breaks inside an element.

E.g. short tables that you don't want to get ripped apart when printing:

@media print {
    table {
        page-break-inside: avoid;
    }
}    
like image 193
A.J.Bauer Avatar answered Oct 04 '22 04:10

A.J.Bauer