-2

Page does not break after a 2 pages div

Working fine with content in 1 page Working fine with content in 1 page

Won't break if previous content is too long, dragged to page 2

Won't break if previous content is too long, dragged to page 2

I put

<div class="pagebreak"></div>

at the end of each of my tickets with style:

.pagebreak { page-break-inside:avoid; page-break-after:always; }

Work fine with 1 page but long document it wont break.

Please help me to break them to correctly page.

Ann Ann
  • 39
  • 8
  • 1
    Provide a proper [mcve], please. _“I put `
    `at the end of each of my tickets”_ - probably that is your mistake already; you should not put this “at the end” of the thing you don’t want to break, but the thing _itself_ should get those properties set. (Think for a second about why that property might be named page-break-_inside_ …)
    – misorude Jan 15 '19 at 09:56
  • Possible Duplicate https://stackoverflow.com/questions/8712677/how-to-apply-css-page-break-to-print-a-table-with-lots-of-rows – Reagan Gallant Jan 15 '19 at 09:57
  • @misorude I want to BREAK right after the table, which is the end of my ticket. It worked like the first image. But second image, the table is a bit long to next page. It wont break. – Ann Ann Jan 15 '19 at 10:05
  • Before you discuss this any further, please do as you were asked to, and provide a proper example! – misorude Jan 15 '19 at 10:08
  • I put it on fiddle, 1 long and 3 shorts https://jsfiddle.net/ghqxzrkb/1/ – Ann Ann Jan 15 '19 at 10:28

1 Answers1

-1

your css

.pagebreak { page-break-inside:avoid; page-break-after:always; }

have you ever tried this instead ?

.pagebreak { page-break-inside:always; page-break-after:always; }

keep me up to date about your problem

KiWindows
  • 1
  • 2