I am generating PDFs with the mPDF class and wondering if and how would it be possible to determine the position of the last line of text in document that is generated mPDF?
I need an HTML box to be cover in height any remaining space between the last line of text and the bottom margin of the document. By setting the html element to height: 100% that pushes the element to the new page and covering the whole height of the new page.
The content of the page is generated dynamically based on a number of factors, so I can never be sure at which vertical position the last line will be at.
If I knew the vertical position of the last line, I could subtract the value from the total page height and then set by CSS the element to have that height.
Is that possible or are there other solutions?