GithubHelp home page GithubHelp logo

Comments (5)

edersoncassioleverpro avatar edersoncassioleverpro commented on May 28, 2024

As a reference, the final goal is to have a page break like below. If I was able to determine dinamically which elements will have a page break, I could customize its rendering through CSS, by:

  • rendering the gray rectangle over the white sheet div
  • calculate its margins based on the current page content size, to fill the unused space with a blank space

So it should be a matter of the element rendering, without affect the model or other internals.

0b93c105-552f-4ed0-a7b5-0087453df5f9

from ckeditor5.

Witoso avatar Witoso commented on May 28, 2024

Thanks for the suggestions, we will keep this open for sure. This topic requires significant research on our side, our initial thoughts, if I remember right, were that such page breaks would be quite challenging to achieve with our current data model.

from ckeditor5.

spacelist-ca avatar spacelist-ca commented on May 28, 2024

@edersoncassioleverpro With medium to large documents, or styling-heavy documents, pagination causes significant performance issues and there are a number of bugs with how it works with tables and imported DocX content.

Have you experience similar performance issues with pagination? in many cases, with a larger document, its essentially unusable.

from ckeditor5.

edersoncassioleverpro avatar edersoncassioleverpro commented on May 28, 2024

I worked on an in-house solution. It persists the pagination results associating page numbers to block element indexes, so the pagination alwas can start from the current page being edited. It certainly makes the page breaking fast when typing at the end of the document.

Also, the process is triggered from the user keystrokes (actually change:data events) in a debounced way, waiting for for an amount of time after him or her stops the typing. This avoids performance issues while user is typing at the beginning of a document, although it will require the process to finish before performing operations on the whole document, such as persistence.

Editions made while the pagination is ongoing should interrupt it and reschedule it in the debounced way I mentioned above.

Maybe you could use the same approach for a reasonably result as I have had here.

from ckeditor5.

edersoncassioleverpro avatar edersoncassioleverpro commented on May 28, 2024

Also, tables should be broken if don't fit into the available space of its starting page. The process I made keeps the lines that fit in the current page and keep the remaining for continuing the process in the next page, possibly making new breaks.

I have some issues with .docx also. There is a bunch of <div> that should be treated recursively, by extracting the paragraphs, headings and others from inside them.

from ckeditor5.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.