Fop
  1. Fop
  2. FOP-1451

RTF doesn't support proportional column widths

    Details

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

      Description

      The attached FO renders very badly in RTF because it contains a lot of
      fo:table elements that use proportional-column-width function for the column
      widths. Changing the width to fixed widths produces a better result but the
      RTF renderer should support proportional-column-width function if possible

      1. RTF_tables.fo
        2 kB
        Chris Bowditch
      2. table-scaling.patch
        18 kB
        Max Aster

        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
        Jeremias Maerki added a comment -

        Patch applied to 0.95 branch with modifications:
        http://svn.apache.org/viewvc?rev=674304&view=rev

        It's not technically bugfixing only but I thought it would be great to have that in 0.95.

        Maximilian's ICLA is recorded. Thanks, Maximilian!

        Show
        Jeremias Maerki added a comment - Patch applied to 0.95 branch with modifications: http://svn.apache.org/viewvc?rev=674304&view=rev It's not technically bugfixing only but I thought it would be great to have that in 0.95. Maximilian's ICLA is recorded. Thanks, Maximilian!
        Hide
        Max Aster added a comment -
        • column-width accepts percent values (proportional-column-width and % working)
        • Table width accepts percent values (100% of the pagewidth as standard)
        • nested tables are working
        • it is also possible to make nested tables with a higher depth than 3 without causing word to crash
        Show
        Max Aster added a comment - column-width accepts percent values (proportional-column-width and % working) Table width accepts percent values (100% of the pagewidth as standard) nested tables are working it is also possible to make nested tables with a higher depth than 3 without causing word to crash
        Hide
        Max Aster added a comment -

        Attachment table-scaling.patch has been added with description: table scaling patch

        Show
        Max Aster added a comment - Attachment table-scaling.patch has been added with description: table scaling patch
        Hide
        Jeremias Maerki added a comment -

        I can probably tell you more tomorrow. Nothing's fixed, yet. I expect them to want to contribute this back to FOP at some point and put it under the ALv2. One of the problems is the lack of an ODF library with a compatible license. All Java ODF libraries I know of are published under the LGPL which complicates things for FOP. Timeframe: rather soon (<2 months probably).

        Show
        Jeremias Maerki added a comment - I can probably tell you more tomorrow. Nothing's fixed, yet. I expect them to want to contribute this back to FOP at some point and put it under the ALv2. One of the problems is the lack of an ODF library with a compatible license. All Java ODF libraries I know of are published under the LGPL which complicates things for FOP. Timeframe: rather soon (<2 months probably).
        Hide
        Antti Karanta added a comment -

        (In reply to comment #3)

        > [1] Incidentally, I'm going to a client today to coach them for implementing
        > ODF output support.

        This is very interesting. Is it going to be in their use only or is it going to be published into public domain? If so, are there any time estimates when this might happen?

        Show
        Antti Karanta added a comment - (In reply to comment #3) > [1] Incidentally, I'm going to a client today to coach them for implementing > ODF output support. This is very interesting. Is it going to be in their use only or is it going to be published into public domain? If so, are there any time estimates when this might happen?
        Hide
        Jeremias Maerki added a comment -

        Maximilian, this goes in the direction of supporting percentages in RTF output. This is mostly done in the layout managers for the page-oriented output formats, so that means it has to be recreated for the flow-based output formats. I assume some kind of tracking mechanism is necessary to have the base values for percentage-based calculations (and proportional-column-width() for that matter). If done properly this might even be useful for the layout managers at some point. Anyway, take a look at org.apache.fop.datatypes.PercentBaseContext. This interface is implemented by AbstractBaseLayoutManager. In the case of RTF, this should probably be a separate class (i.e. that tracking mechanism I mentioned above) so it can be reused by other/future flow-based output formats [1]. For the table columns, take a look at org.apache.fop.layoutmgr.table.TableLayoutManager which contains code for handling the proportional-column-width() approach. Something similar has to be done for the flow-based formats.

        [1] Incidentally, I'm going to a client today to coach them for implementing ODF output support.

        Show
        Jeremias Maerki added a comment - Maximilian, this goes in the direction of supporting percentages in RTF output. This is mostly done in the layout managers for the page-oriented output formats, so that means it has to be recreated for the flow-based output formats. I assume some kind of tracking mechanism is necessary to have the base values for percentage-based calculations (and proportional-column-width() for that matter). If done properly this might even be useful for the layout managers at some point. Anyway, take a look at org.apache.fop.datatypes.PercentBaseContext. This interface is implemented by AbstractBaseLayoutManager. In the case of RTF, this should probably be a separate class (i.e. that tracking mechanism I mentioned above) so it can be reused by other/future flow-based output formats [1] . For the table columns, take a look at org.apache.fop.layoutmgr.table.TableLayoutManager which contains code for handling the proportional-column-width() approach. Something similar has to be done for the flow-based formats. [1] Incidentally, I'm going to a client today to coach them for implementing ODF output support.
        Hide
        Max Aster added a comment -

        Inside the source code (RTFHandler) is also a comment saying that its not implemented well at the moment.
        I would like to help fixing the problem.
        Hints are always welcome

        Show
        Max Aster added a comment - Inside the source code (RTFHandler) is also a comment saying that its not implemented well at the moment. I would like to help fixing the problem. Hints are always welcome
        Hide
        Chris Bowditch added a comment -

        Attachment RTF_tables.fo has been added with description: Test FO to reproduce bug

        Show
        Chris Bowditch added a comment - Attachment RTF_tables.fo has been added with description: Test FO to reproduce bug
        Chris Bowditch created issue -

          People

          • Assignee:
            fop-dev
            Reporter:
            Chris Bowditch
          • Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development