Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Orphans calculation seems to be off by one #1617

Closed
Mellthas opened this issue Dec 11, 2017 · 1 comment · Fixed by #2507
Closed

Orphans calculation seems to be off by one #1617

Mellthas opened this issue Dec 11, 2017 · 1 comment · Fixed by #2507
Milestone

Comments

@Mellthas
Copy link
Member

See the attached test case (document size 400pt×300pt):
orphans-bug.zip

The CSS specifies orphans: 3, but two lines stay on the first page. Using orphans: 4, the second paragraph is moved to the second page completely. After trying out different paragraph lengths and orphan numbers, it seems the orphan count is always off by one.

@Mellthas
Copy link
Member Author

This might actually be addressed by #1356.

Mellthas added a commit to Mellthas/dompdf that referenced this issue Aug 1, 2021
This effectively forbids line breaks before the first line, even if
`orphans` is only 1.

Fixes dompdf#1617
Mellthas added a commit to Mellthas/dompdf that referenced this issue Aug 1, 2021
This effectively forbids line breaks before the first line.

Fixes dompdf#1617
Mellthas added a commit to Mellthas/dompdf that referenced this issue Aug 27, 2021
This effectively forbids line breaks before the first line.

Based on work in dompdf#1356
Fixes dompdf#1617

Co-authored-by: David Sickmiller <david@sickmiller.com>
@bsweeney bsweeney linked a pull request Sep 3, 2021 that will close this issue
@bsweeney bsweeney added this to the 1.1.0 milestone Sep 3, 2021
Mellthas added a commit to Mellthas/dompdf that referenced this issue Sep 13, 2021
This effectively forbids line breaks before the first line. Also, check
the orphans property on the block parent, as it only applies to block container
elements per spec.

Based on work in dompdf#1356
Fixes dompdf#1617

Co-authored-by: David Sickmiller <david@sickmiller.com>
Mellthas added a commit to Mellthas/dompdf that referenced this issue Sep 14, 2021
This effectively forbids line breaks before the first line. Also, check
the orphans property on the block parent, as it only applies to block container
elements per spec.

Based on work in dompdf#1356
Fixes dompdf#1617

Co-authored-by: David Sickmiller <david@sickmiller.com>
bsweeney pushed a commit that referenced this issue Sep 18, 2021
This effectively forbids line breaks before the first line. Also, check
the orphans property on the block parent, as it only applies to block container
elements per spec.

Based on work in #1356
Fixes #1617

Co-authored-by: David Sickmiller <david@sickmiller.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants