Details

    • Bug
    • Resolution: Unresolved
    • Major
    • None
    • None
    • Office
    • None
    • Unknown

    Description

      When exporting to Office (ODT) the HTML given to Office for the following wiki content:

      |= table header |= table header |= table header
      | cell | cell | cell
      | cell | cell | cell
      

      will contain spaces in each <th> and <td> at the beginning and end of each cell.
      The result in Office is the following:

      If your wiki content is like that, then you get a nicer display

      |=table header|=table header|=table header
      |cell|cell|cell
      |cell|cell|cell
      

      which becomes even better with a width param:

      (% width="100%" %)
      |=table header|=table header|=table header
      |cell|cell|cell
      |cell|cell|cell
      

      So we would need to use an HTMLCleaner which trims the white spaces in cells and also adds a width parameter to the

      Note that in XWiki all this displays the same (100%):

      It's also unclear why in office the "th" ends up centered while the "td" is left align. The HTML has no difference.

      Attachments

        Activity

          [XWIKI-20300] ODT Export display issues with tables
          ludovic Ludovic Dubost added a comment -

          After more testing, it has been found that the "CO2" display is a bug of the Klima font which was used in this specific document. It might be an easter egg as the font is called "Klima".
          Concerning the table width there is still an issue to resolve. I will however create another ticket because the data in this ticket might be confusing.
          I'll close the ticket once the new one is created.

          ludovic Ludovic Dubost added a comment - After more testing, it has been found that the "CO2" display is a bug of the Klima font which was used in this specific document. It might be an easter egg as the font is called "Klima". Concerning the table width there is still an issue to resolve. I will however create another ticket because the data in this ticket might be confusing. I'll close the ticket once the new one is created.
          ludovic Ludovic Dubost added a comment -

          The suggestion was to trim the spaces only for the LibreOffice export which currently give a very bad display with the special character inserted. So there might be a bug in LibreOffice which converts the spaces badly to these special characters. Now until we can get this one fixed we would need a way to workaround it. My suggestion was to trim to avoid the bad display.

          Also the width is an issue because LibreOffice will make the table around 50% width of the page when no width is indicated. For our client, I've been able to use a Filter to get the tables to 18cm instead of 10cm and therefore restore a full page width. Now it's questionnable if the html produced by XWiki should not indicate the actual expected width after conversion (100% for example).

          ludovic Ludovic Dubost added a comment - The suggestion was to trim the spaces only for the LibreOffice export which currently give a very bad display with the special character inserted. So there might be a bug in LibreOffice which converts the spaces badly to these special characters. Now until we can get this one fixed we would need a way to workaround it. My suggestion was to trim to avoid the bad display. Also the width is an issue because LibreOffice will make the table around 50% width of the page when no width is indicated. For our client, I've been able to use a Filter to get the tables to 18cm instead of 10cm and therefore restore a full page width. Now it's questionnable if the html produced by XWiki should not indicate the actual expected width after conversion (100% for example).
          vmassol Vincent Massol added a comment - - edited

          So we would need to use an HTMLCleaner which trims the white spaces in cells

          White spaces are honored in XWiki so if you add spaces they'll be displayed and thus converted too and that seems the good thing to do.

          Proof:

          For:

          |=h1|=h2
          | cell1 | cell2
          

          You get:

          vmassol Vincent Massol added a comment - - edited So we would need to use an HTMLCleaner which trims the white spaces in cells White spaces are honored in XWiki so if you add spaces they'll be displayed and thus converted too and that seems the good thing to do. Proof: For: |=h1|=h2 | cell1 | cell2 You get:

          People

            Unassigned Unassigned
            ludovic Ludovic Dubost
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated: