Hi i got the solution to my question..used $mpdf->y which returned my y position. So i could check if the y position is greater than the approx height of the table. :)
Getting Y co-ordinate of a page in mpdf
-
30-07-2022 - |
Question
I am using mpdf to generate certain tables on a pdf. Each table has a title text on top of it. I want to know the current y coordinate of the page to make the output proper. Currently sometimes the title comes on 1 page and the table on the next
I tried using $mpdf->GetY()
but it gives an error. Please help
Solution
OTHER TIPS
class mPDF
has a public property $y
You can directly get Y co-ordinate by accessing this variable.
Check if that works for you.
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow