FOP
  1. FOP
  2. FOP-1442

Collapsed borders on tables in tables not considered to lie half in the before and after margins

    Details

    • Type: Bug Bug
    • Status: Closed
    • Resolution: Fixed
    • Affects Version/s: trunk
    • Fix Version/s: None
    • Component/s: layout/unqualified
    • Labels:
      None
    • Environment:
      Operating System: other
      Platform: Other
    • External issue ID:
      43712

      Description

      This may be related to FOP-1433. However, 43616 has already been fixed (I am
      using rev-588275).

      The attached XSL-FO, converted to PDF, will have the last paragraph broken to
      the next page even though there still is plenty of space in the current page for
      the extra two lines:

      1. bug.xml
        30 kB
        Isaac Shabtay

        Activity

        Hide
        Glenn Adams added a comment -

        batch transition pre-FOP1.0 resolved+fixed bugs to closed+fixed

        Show
        Glenn Adams added a comment - batch transition pre-FOP1.0 resolved+fixed bugs to closed+fixed
        Hide
        Vincent Hennebert added a comment -

        My bad, the problem was totally unrelated...

        border-collapse is an inheritable property, so if it is set to "separate" on an
        outer table it will also be set to "separate" on inner tables. I've checked and
        it works properly.

        The problem here was due to a bug that I fixed in revision 596727: the height of
        some elements was counted twice, once in a glue and once in a box. The attached
        sample looks fine now.

        Vincent

        Show
        Vincent Hennebert added a comment - My bad, the problem was totally unrelated... border-collapse is an inheritable property, so if it is set to "separate" on an outer table it will also be set to "separate" on inner tables. I've checked and it works properly. The problem here was due to a bug that I fixed in revision 596727: the height of some elements was counted twice, once in a glue and once in a box. The attached sample looks fine now. Vincent
        Hide
        Vincent Hennebert added a comment -

        Hi Isaac,

        thanks for reporting the problem. This is not related to FOP-1433. I strongly
        suspect that this is due to the fact that collapsed borders are not considered
        to lie half in the before and after margin for tables which are inside another
        table. You can circumvent the problem by specifying border-collapse="separate"
        on the inner tables. You will have to rework your border specifications a bit,
        but you should still be able to achieve the layout you need. Please ask on
        fop-users if you need more explanations.

        Details: the merging algorithm seems to forget that the border-before/after on a
        table with collapsing borders lie half in the margin. Thus the total size of the
        merged sequence is bigger than expected, and overflows the page size. Whereas
        when adding the areas, borders are actually put half in the margins, so that on
        the visual results it looks like there is still room for the last 2 lines.

        Show
        Vincent Hennebert added a comment - Hi Isaac, thanks for reporting the problem. This is not related to FOP-1433 . I strongly suspect that this is due to the fact that collapsed borders are not considered to lie half in the before and after margin for tables which are inside another table. You can circumvent the problem by specifying border-collapse="separate" on the inner tables. You will have to rework your border specifications a bit, but you should still be able to achieve the layout you need. Please ask on fop-users if you need more explanations. Details: the merging algorithm seems to forget that the border-before/after on a table with collapsing borders lie half in the margin. Thus the total size of the merged sequence is bigger than expected, and overflows the page size. Whereas when adding the areas, borders are actually put half in the margins, so that on the visual results it looks like there is still room for the last 2 lines.
        Hide
        Isaac Shabtay added a comment -

        Attachment bug.xml has been added with description: XSL-FO that demonstrates the problem

        Show
        Isaac Shabtay added a comment - Attachment bug.xml has been added with description: XSL-FO that demonstrates the problem
        Isaac Shabtay created issue -

          People

          • Assignee:
            fop-dev
            Reporter:
            Isaac Shabtay
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development