Viewing 10 posts - 1 through 10 (of 10 total)
  • Author
    Posts
  • #26460

    Hi All,

    I Have One Small Problem i.e we have One Table The Table Header Are Print In Each Page

    How To I Write A code Please Tell Me!

    Note:- I am Writing The Code In html.

    I Hope U have Solve This Small Problem

    #28216

    PD4ML API includes enableSmartTableBreaks() (formerly enableTableBreaks()) method. The method forces PD4ML to split tables protecting table rows content and to replicate table headers (if any) from page to page. Unfortunately there is no way to trigger the mode from HTML code yet.

    Table header ia a row (or multiple rows) consists of

    tags only.

    In v361b2 the table break logic was significantly refactored. So it is recommended to use the build or a newer one.

    #28217

    I have the following CSS and table html

    tr.noBreakCell{
    page-break-inside:avoid;
    }

    header 1 header 2 header 3 header 4
    cell 1 cell 2 cell 3 cell 4
    cell 1 cell 2 cell 3 cell 4
    cell 1 cell 2 cell 3 cell 4

    I have a number of tr row with class = noBreakCell, I found that when I not use:
    pd4mlObj.enableSmartTableSplit(true);

    the table is break while row does not break inside, this is fine.

    But I try to have the table header repeat on different page, it turns out that the whole table is being moved to the next page instead of splitting into multiple page, did I use anything wrongly?

    #28218

    Previous post typo mistable, it should be
    enableSmartTableBreaks(true);

    #28219

    Here this is the HTML that I try to print using PD4ML:
    download fromdropbox:
    http://dl.dropbox.com/u/9697160/PackNote.htm
    I applied page-break-inside:avoid in tr with class ‘noBreak’

    When I set enableSmartTableBreaks(false); or not apply the statement, it can split table without spliting table tr row, just the table header does not repeat.

    When I set enableSmartTableBreaks(true); as the table cannot fit completely in the first page, it completely moved to the second page. leaving the first page with blank area.

    PD4ML is great in helpping us developing our print out function but just this spliting not yet fulfill our print test. Really look forward to see whether it is because of my table html / css or JAVA set wrongly.

    The ver of PD4ML we used: 3701b1 demo (we need to see PD4ML fulfill our test in order to buy the volumn licenses)
    code for html generation: JAVA/JSP
    how we use pd4ml: we build jsp report and use PD4ML to handle the print by mean of converting the built pdf file to bytearray and send to our printer.

    #28220

    enableSmartTableBreaks(true) implicitly defines

    TABLE, TR { page-break-inside: avoid }

    You may partially override it with

    TABLE { page-break-inside: auto !important }

    to prevent a table moving to its next page.

    #28221

    Does this valid in PD4ML if I wish a particular block not to be broken:

    div{page-break-inside: avoid}

    #28222

    For DIV it should work.

    #28223

    @ustarhk wrote:

    I have the following CSS and table html

    tr.noBreakCell{
    page-break-inside:avoid;
    }

    header 1 header 2 header 3 header 4
    cell 1 cell 2 cell 3 cell 4
    cell 1 cell 2 cell 3 cell 4
    cell 1 cell 2 cell 3 cell 4

    I have a number of tr row with class = noBreakCell, I found that when I not use:
    pd4mlObj.enableSmartTableSplit(true);

    the table is break while row does not break inside, this is fine.

    But I try to have the table header repeat on different page, it turns out that the whole table is being moved to the next page instead of splitting into multiple page, did I use anything wrongly?

    #28224

    pd4mlObj.enableSmartTableSplit(true) API call implicitly defines

    TABLE, TR {page-break-inside: avoid }

    In order to workaround the issue you faced with, I would recommend to partially unset the CSS style with

    TABLE {page-break-inside: avoid !important}

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

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