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

[PATCH] Percental table column width not calculated from table

    Details

    • Type: Bug
    • Status: Resolved
    • Resolution: Fixed
    • Affects Version/s: 1.0
    • Fix Version/s: None
    • Component/s: renderer/rtf
    • Labels:
      None
    • Environment:
      Operating System: All
      Platform: Other
    • External issue ID:
      50901

      Description

      The width of table columns is not correctly calculated for RTF output. A percental width should be calculated from the enclosing table's width.

      org.apache.fop.layoutmgr.table.TableLayoutManager actually does this for PDF output (see getBaseLength() implementation), but org.apache.fop.render.rtf.rtflib.tools.PercentContext doesn't.

      The result is that the last column gets the entire space.

      I'll attach a small example demonstrating the problem as well as a patch that fixes that problem for me.

        Attachments

        1. test-before-patch.rtf
          4 kB
          Carsten Pfeiffer
        2. test-after-patch.rtf
          4 kB
          Carsten Pfeiffer
        3. test.pdf
          5 kB
          Carsten Pfeiffer
        4. test.fo
          2 kB
          Carsten Pfeiffer
        5. fop-rtf-table-column-width.patch
          1 kB
          Carsten Pfeiffer

          Activity

            People

            • Assignee:
              fop-dev@xmlgraphics.apache.org fop-dev
              Reporter:
              carsten.pfeiffer Carsten Pfeiffer
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: