'How do I prevent the table from splitting by 2 in cfdocument?
I am currently working on creating pdf file using cfdocument.
I'm able to get total pages between tags cfdocumentitem type="footer" , but #cfdocument.totalpagecount# within cfdocumentsection section is not working.
I also tried to assign this value to another variable in my cfdocumentitem many times, it didn't work either.
Briefly, what I want to do is: My pages are split very nicely. However, there is 1 table at the end of the page, I do not want that table to be split. If it doesn't fit on the top page, I want the whole table to go to the bottom page. How can I check this? I would be glad if you help.
Solution 1:[1]
This can be accomplished with CSS
table.endtable {page-break-inside: avoid;}
There is an alternative solution but I think it can only be accomplished on lucee 5.3+ This will show the table header on all pages the table shows
table {
-fs-table-paginate: paginate;
}
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | ssteinbeck |
