PD4ML v4 Forums PD4ML v3 Archived Forums (Read Only) HTML/CSS rendering issues Page break is inserted on TR with empty TD

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #26805

    Hi, I’ve been troubleshooting a problem with empty PDF pages.
    I’ve got a TR-TD in a legacy code which is used to separate vertical components:
    [language=html:1b1lvkqf]

    [/language:1b1lvkqf]
    I noticed that PD4ML pastes page breaks when such component is occurred.
    To check this I added pd4ml proprietary css feature:
    [language=CSS:1b1lvkqf]TR { page-break-inside: avoid;
    pd4ml-page-break-border-top: 1px solid red;
    pd4ml-page-break-border-bottom: 1px solid blue; }[/language:1b1lvkqf]

    Indeed instead of having empty TR-TD printed PD4ML inserted blue border which is used to print border bottom line.

    How can it be fixed without changing the legacy code?

    Thanks, Oleksii

    #29180

    > I noticed that PD4ML pastes page breaks when such component is occurred.

    No, it is not quite correct. PD4ML forces a page break, when TR { page-break-inside: avoid } is set, and a subsequent TR content does not fit remaining page space.

    pd4ml-page-break-border-* properties currently are not useful, as the current table break logic deals correctly with borders in most of the cases.

    > How can it be fixed without changing the legacy code?
    I hope an HTML sample would help us to correctly understand the problem you faced with. Please publish it here or send it to support pd4ml com

    #29181

    I hope an HTML sample would help us to correctly understand the problem you faced with. Please publish it here or send it to support

    The source HTML file is here
    Element which causes page break is on the line 494 in the source HTML (or search for a comment “Empty TD leads to pdf page break”)
    Rendered PDF with this element is here
    Rendered PDF without this element (or
    can be placed inside empty

    ) is here

    The red dashed line shows where PD4ML inserts pd4ml-page-break-border-bottom
    (defined in HTML head section)

    Thanks, Oleksii

    #29182

    I’ve forgotten to provide the PD4ML configuration settings:

    unitsValue = UNIT_VALUE_POINTS;
    dimension = A4;
    landscapeValue = false;
    enableSmartTableBreaks = true;
    interpolateImages = true;
    adjustHtmlWidth = true;
    fitPageVertically = false;
    enableImgSplit = false;
    topInset = 40;
    leftInset = 40;
    rightInset = 30;
    bottomInset = 30;

Viewing 4 posts - 1 through 4 (of 4 total)

The forum ‘HTML/CSS rendering issues’ is closed to new topics and replies.