Forums

The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums CSS page-break paragraph

  • This topic is empty.
Viewing 1 post (of 1 total)
  • Author
    Posts
  • #292708
    joan
    Participant

    Hi guys,

    I would like some advise about one problem with pagination and I even don’t know if it has solution.

    The context is with twig and symphony.

    I generate a PDF document
    This PDF document can be in one or more than two pages.

    All elements are well positioned and it work except for one row who can be longer and so it will start automatically on new page.
    This one should start on the first page for example and finish and the second or third. but it will automatically start in the new page if the content will be bigger than what pagination expect to finish the current page.

    So now I try to show you the result I expect:

    ******Page1******

    column title // column content

    title…………..blabla
    type……………blabla
    description……..paragraph

    *********page 2 ***********

    description……..paragraph

    And here is the result I have :

    ******Page1******

    column title // column content

    title…………..blabla
    type……………blabla
    description……..

    *********page 2 ***********

    ……………. paragraph

    So as above the goal is to start the description on the page 1 and continue on the page 2
    I can do that inside the column title with no problem because the text is short, but the paragraph will start on the second page no matter what

    {{ 'job description'|trans }} {{ entity.description|striptags }} {{ 'job description'|trans }} {{ entity.description|purify }}

    (I add space in tr tag to let you see it, if not doesn’t appear on the message)

    tr.splitable {
    page-break-inside: avoid;
    }
    tr.splitable :only-child, tr.splitable td :only-child{
    page-break-inside: avoid;
    page-break-after: avoid;
    page-break-before: avoid;
    }

    So with this code, it will be impossible to let the paragraph start from the first page, and I can’t do that like positioning by using pixel because in my example that page 1 and 2 but it can be 2 and 3 depend the other content.
    If someone has some idea how it could be possible to do that should be helpful.

    Thank you guys.

Viewing 1 post (of 1 total)
  • The forum ‘CSS’ is closed to new topics and replies.