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

Auto Pagination / Page Breaks #3737

Open
Gazook89 opened this issue Sep 22, 2024 · 4 comments
Open

Auto Pagination / Page Breaks #3737

Gazook89 opened this issue Sep 22, 2024 · 4 comments
Assignees
Labels

Comments

@Gazook89
Copy link
Collaborator

Your idea:

It would be nice to not need manual page breaks-- the document should automatically determine where page breaks are needed and create a new page. Manual page breaks would still be allowed.

An example of a web document editor that manages to do this is Google Docs.

Likely, some method of calculating the height of elements and determining when that total height is greater than the page/container height, and then splitting the last element that overflows into a new page/container. Calculating heights of whole elements is likely "easy", but a library would likely be needed for calculating exactly where to split the text node of the last element.

Or, a library to handle it all (paged.js).

There are likely a million edge cases where this will have poor results. But I think it's worth a try at some point, if for no other reason than to have a good answer when someone else asks for it.

@Gazook89 Gazook89 added feature 🚀 V4 Wait for V4 labels Sep 22, 2024
@5e-Cleric
Copy link
Member

issue #66 was the original tracker, but it is abandoned and contains no additional information.

@dbolack-ab
Copy link
Collaborator

I want to look into this after the #3870 and the Master Pages PRs ( if included ) are merged.

@dbolack-ab dbolack-ab self-assigned this Jan 16, 2025
@dbolack-ab
Copy link
Collaborator

A set of supporting questions:

Assuming we implement soft page breaks (breaks that are determined by code, not by user declaration)

  1. Do we want to insert a symbol or decoration into the editor at the position of a soft-break?
    a. Should this be a full symbol ( \spage followed by any page parameters from the parent ) with the same or alternate decoration as \page as a full line
    b. Should this be a single symbol insert - such as a Form Feed icon - with decoration?
  2. Do we want a facility where the user may request that the editor convert all of those soft page breaks into hard page breaks ( presumably by duplicating the \page line from the parent/previous page?
    a. Should this be an automatic process?
    b. Should this be guided much like a global search-and-replace with a "yes/no" prompt

@5e-Cleric
Copy link
Member

1: yes, but i don't love a or b, not sure

2: i had not though of that but it is a good idea.
a. i think not, could be a nightmare, manual decision is key
b. unsure, i think we could add a checkbox to enable/disable this feature completely or only the suggestions/ability to turn into hard break

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

No branches or pull requests

3 participants