Skip to content

Conversation

rasamassen
Copy link

@rasamassen rasamassen commented Sep 9, 2025

Add missing pagination abilities.

Description

  • Adds hasWidowControl, isKeepNext, isKeepLines
  • Fixes hasPageBreakBefore() triggering wrong RTF tag (was using \page, should be using \pagebb).

Unsolved Issues

  • Widow/Orphan control is default "off" in RTF (even if it wasn't set in \RTF\Part\Document.php, as it currently is), but is default "on" in most modern document programs (Microsoft Word, Google Docs, etc.). In Paragraph, Widow/Orphan control is default "on", which means every paragraph has to manually override the document level setting. Unfortunately, there's currently no way to check the Widow/Orphan settings of the entire document (there's nothing in Settings), but it would be simpler output if there was a Document-level setting that could be checked, and only print the opposite setting if set at the document level. The way things are works, but it's less than ideal setting this variable every paragraph.

Checklist:

  • My CI is 🟢
  • I have covered by unit tests my new code (check build/coverage for coverage report)
  • I have updated the documentation to describe the changes
  • I have updated the changelog

@coveralls
Copy link

Coverage Status

coverage: 96.758% (+0.001%) from 96.757%
when pulling 3d63e96 on rasamassen:paragraph
into 0ab0b49 on PHPOffice:master.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants