You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Here's the scenario. My app prints HTML (specifically, pretty-printed source code using prismjs). I can't have a line of source code at the bottom of a page be split in half between that page and the next page.
This is what page-break-before: always is for.
Not sure how this would be implemented.
For now i have implemented an awful hack where, because I generate the HTML, i know line height and I can calculate how many lines fit on a page. With this, i'm able to adjust my draw code to account for lines that overflow.
This screen shot has some diagnostics turned on that also turns off clipping:
Same content, with my diagnostics off, showing that it works. But man is this a hack:
The text was updated successfully, but these errors were encountered:
Here's the scenario. My app prints HTML (specifically, pretty-printed source code using
prismjs
). I can't have a line of source code at the bottom of a page be split in half between that page and the next page.This is what
page-break-before: always
is for.Not sure how this would be implemented.
For now i have implemented an awful hack where, because I generate the HTML, i know line height and I can calculate how many lines fit on a page. With this, i'm able to adjust my
draw
code to account for lines that overflow.This screen shot has some diagnostics turned on that also turns off clipping:
Same content, with my diagnostics off, showing that it works. But man is this a hack:
The text was updated successfully, but these errors were encountered: