Uploaded image for project: 'XWiki Platform'
  1. XWiki Platform
  2. XWIKI-5509

PDF Export fails for field style with textarea type

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 2.4
    • Fix Version/s: 2.5.1, 2.6 RC1
    • Component/s: {Unused} Export
    • Labels:
      None
    • Difficulty:
      Trivial
    • Similar issues:

      Description

      With XWiki 2.4 (I believe this is also true for later versions), it is not possible to make the example in http://platform.xwiki.org/xwiki/bin/view/AdminGuide/Configuration#HCustomizingthePDFexportLook26Feel
      related to the configuration of the field style work. After some debugging, the problem is the type of the field "style". when using a field of type TextArea for the style property of the PDFClass class, a new paragraph wraps all the style field content, resulting in something like:

      <p>
      h2 {
      margin-left: 2cm;
      margin-bottom: 1cm;
      color: red;
      }
      h3 {
      margin: 3cm;
      color: yellow;
      }
      </p>

      Instead of what we simply wrote in the first place:

      h2 {
      margin-left: 2cm;
      margin-bottom: 1cm;
      color: red;
      }
      h3 {
      margin: 3cm;
      color: yellow;
      }

      To make sure that the problem was not related to the editor we were using or something, we forced the usage of the simple Text editor for the field but the result was the same. This example only worked when a string type was used a String instead of a TextArea.

        Attachments

          Activity

            People

            Assignee:
            sdumitriu Sergiu Dumitriu
            Reporter:
            pzenida Paulo Zenida
            Votes:
            1 Vote for this issue
            Watchers:
            2 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:
              Date of First Response: