mirror of
https://github.com/foliojs/pdfkit.git
synced 2025-12-08 20:15:54 +00:00
Make sure that the first line of a paragraph is never by itself at the bottom of a page
This commit is contained in:
parent
bffd8d9878
commit
0d11ae8777
@ -221,8 +221,10 @@ module.exports =
|
||||
# we're no longer on the first line...
|
||||
wrap.firstLine = false
|
||||
|
||||
# if we've reached the maximum height provided
|
||||
if @y > maxY
|
||||
# if we've reached the maximum height and make sure
|
||||
# that the first line of a paragraph is never by itself
|
||||
# at the bottom of a page
|
||||
if @y > maxY or (wrap.lastLine and @y + @currentLineHeight(true) > maxY)
|
||||
return unless @y >= @page.maxY()
|
||||
|
||||
# if we've reached the edge of the page,
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user