I have a grid where we need to ellipsize content being displayed. (Mobile devices are important) This means each row has a fixed height and the grid works well. The trade-off is that some columns do not show all the data (names of business entities and clients) for instance a <td> item might show "A long busines..." instead of "A long business name 01" or "A long business name 02".
The grid provides the facility to export to Excel and to PDF. For the PDf export I change the css markup (in an onPDFExport event) so that the text is fully displayed. This causes rows which has previously ellipsized/truncated text to flow over to a second line and the row becomes double the height. The PDF export now breaks as the calculation of the number of rows that fit on the page appears to have been made before the onPDFExport event fires. If I had 20 single height rows fitting on a page and now have the first 5 of those rows becoming double the height, only the first 15 items now fit on the page and items 16 to 20 get "lost" at the end of page 1. page 2 then starts at item 21.
Does anybody know how I can get the calculations done after I make my CSS change but before the export? I thought of changing the paperSize before the CSS change to let's say A3 and then go to A4 after the change but I do not know how I can do this in a javascript function.