Uploaded image for project: 'FOP'
  1. FOP
  2. FOP-1840

[PATCH] Region-Body Column balancing incorrect if content is table with header

    XMLWordPrintableJSON

    Details

    • Type: Improvement
    • Status: Closed
    • Resolution: Fixed
    • Affects Version/s: 1.0
    • Fix Version/s: 2.2
    • Component/s: layout/unqualified
    • Labels:
      None
    • Environment:
      Operating System: All
      Platform: PC
    • External issue ID:
      49801

      Description

      To reproduce bug please do the following:
      Use:
      <fo:region-body region-name="PageBody" column-count="2" />

      Fill the region-body with content like :
      <fo:block span="none" > ...(content is table with header) ..
      <fo:block span="all"> ... (one line (summary)) ..

      If the content is made of normal blocks the columns are balanced before the span="all" summary line.
      like:
      123456 456789
      234567 567890
      345678 678901
      Summary: 1234567890

      If the content is a table without headers the columns are balanced correct.
      like:
      123456 456789
      234567 567890
      345678 678901
      Summary: 1234567890

      If the content is a table with header the columns are not balanced correct. (the right one is shorter.)
      Header Header
      123456 567890
      234567 678901
      345678
      456789
      Summary: 1234567890

      The "computeDemerits()" algorithm is wrong in class "BalancingColumnBreakingAlgorithm".
      The "fullLen" value is to short. Exactly the replicated header width is missing. In the "par" list the header is contained only once although the header is displayed in every column. (in the example twice)

      Solution could be to place the header as many times in the "par" list as many columns exist, or to count the existing one header as many times as needed.

        Attachments

        1. fo.xml
          4 kB
          a.kovacs
        2. b49801.fo
          4 kB
          Andreas L. Delmelle
        3. b49801_dirty_hack.patch
          1 kB
          Alexios Giotis
        4. test-before.pdf
          5 kB
          Alexios Giotis
        5. test-after.pdf
          5 kB
          Alexios Giotis
        6. patch.diff
          48 kB
          Robert Meyer
        7. balancing-fos.zip
          17 kB
          Robert Meyer
        8. balance-2.fo
          45 kB
          Alexios Giotis
        9. balance-2.pdf
          7 kB
          Alexios Giotis
        10. balance-2-expected.pdf
          7 kB
          Alexios Giotis
        11. fix.diff
          0.8 kB
          Robert Meyer
        12. balance-3.fo.xml
          233 kB
          Alexios Giotis
        13. balance-4.fo.xml
          67 kB
          Alexios Giotis
        14. balance-4.pdf
          10 kB
          Alexios Giotis
        15. balance-4-edited.fo.xml
          65 kB
          Luis Bernardo
        16. balance-4-none.fo.xml
          67 kB
          Luis Bernardo
        17. balance-5.fo
          66 kB
          Alexios Giotis
        18. output-balance5.pdf
          10 kB
          Robert Meyer

          Activity

            People

            • Assignee:
              fop-dev@xmlgraphics.apache.org fop-dev
              Reporter:
              a.kovacs@i-docs.com a.kovacs
            • Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: