coderb Posted December 8, 2008 Share Posted December 8, 2008 Hi All, I'm a bit stuck trying to figure how to ensure my page break is always in the correct position. I'm using the CSS property - page-break-after: always I'm generating an html table with dynamic content. The table row can end up wrapping over two, sometimes more, lines depending on the content in a cell, which I obviously wont know in advance. How on earth do I count the number of actual html generated rows, so that I can insert a printer friendly page break? Any help appreciated, cheers. Link to comment https://forums.phpfreaks.com/topic/136075-page-break-in-the-right-place-for-printer-friendly-pages/ Share on other sites More sharing options...
Yesideez Posted December 8, 2008 Share Posted December 8, 2008 I have a suspect feeling the OS will take care of it for you but not sure. Link to comment https://forums.phpfreaks.com/topic/136075-page-break-in-the-right-place-for-printer-friendly-pages/#findComment-709520 Share on other sites More sharing options...
coderb Posted December 8, 2008 Author Share Posted December 8, 2008 actually, I should explain better I have two tables, formatted one below the other. the first table, with unknown dynamic content, can break over two pages no problem, however, the second table should not be split. The good thing is the second table is fixed, so I will always know its length in printable rows, therefore if its length 6 rows, then all I need to do is ensure that there are 6 rows available on the page otherwise I insert a page break first. So you can see the issue is knowing how many actual html lines the first table is going to be. Link to comment https://forums.phpfreaks.com/topic/136075-page-break-in-the-right-place-for-printer-friendly-pages/#findComment-709546 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.