0

Is there any way to get the Y Position of a specific HTML Element? I would like to make a page Break before a heading, if the heading is the last element of the page:

enter image description here

Ill tried already with Javascript, but it seems JS is not working with DomPDF.

derdida
  • 14,784
  • 16
  • 90
  • 139
  • 1
    You're asking about [widows and orphans](https://en.wikipedia.org/wiki/Widows_and_orphans) control with DOMPdf of which it is really weak (some may even say this is not supported, but that's not helpful in light of your question). However, you can find a bit of existing Q&A material on Stackoverflow about it, and I'd suggest instead of trying with JS (which does not work as you've found out) to compare against existing Q&A if you can find something there-in that could work for your use-case. – hakre Jul 20 '23 at 06:46
  • Thank you, i will have a look into it :-) – derdida Jul 20 '23 at 17:04

0 Answers0