0

I have huge problem. I will explain everything:

  1. I have project in Angular
  2. I use PrimeNG to create my table
  3. I want to page-break-after/before the table (<tr> best way)
  4. Web browse I use -> Google Chrome / Chromium

I just want to break my table. Simple idea, but it is so difficult to do. I treid to modify my table using heihgt row properties. I tried this (and a lot of similar):

@media print {
    ::ng-deep tr.justBreak  { display: block; page-break-before: always; }
}

I tried many, many examples. Most of all they dosen't work or they works bad (I can say very bad, unacceptably). So propably if someone paste here any existing example, it almost certain that I tried this one, too. I hope someone know how to resolve my problem.

Iggsy
  • 113
  • 1
  • 2
  • 13
  • "I just want to break my table" ... it sounds like it is already broken ;) joking aside, what do you mean you want to break it? you want a page break after a row? you want an empty row after a row? please explain – danday74 Sep 20 '18 at 13:27
  • page-break-before/after seems simple enough - what do you mean by "`` best way"? Do you mean you want to insert a `tr` at the start of the table? Or that you want to page-break on a specific `tr`? (and not on the `` at all?)
    – freedomn-m Sep 20 '18 at 13:29
  • 1
    @danday74 :D I just want a page break after a row. For example, I have table (20 rows) and I want to have 5 rows on a page, then new page next 5 rows and so on. – Iggsy Sep 20 '18 at 13:31
  • Looks like you've already tried the solution to the same question here: https://stackoverflow.com/questions/20481039/applying-page-break-before-to-a-table-row-tr what's different between your situation and that one? – freedomn-m Sep 20 '18 at 13:32
  • @freedomn-m I want to page-break on specific 'tr' – Iggsy Sep 20 '18 at 13:32
  • Can you include the HTML markup in the question? And can you make a stackblitz showing the problem? – ConnorsFan Sep 20 '18 at 13:34
  • @freedomn-m I tried this one. When I just copy&paste this example for my table it just moves my selected tr to the left and nothing more (originally my table is centered) – Iggsy Sep 20 '18 at 13:37
  • @ConnorsFan this is my problem: https://stackblitz.com/edit/angular-zyynmw – Iggsy Sep 20 '18 at 13:50
  • @ConnorsFan this is good example? – Iggsy Sep 21 '18 at 06:08

0 Answers0