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

PDF Export fails for field style with textarea type

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • Major
    • 2.5.1, 2.6 RC1
    • 2.4
    • {Unused} Export
    • None
    • Trivial

    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

        1. PdfExportImpl.java.patch
          0.6 kB
          Paulo Zenida
        2. PdfExportImpl.java.patch2
          3 kB
          Flavius Olaru

        Activity

          People

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

            Dates

              Created:
              Updated:
              Resolved: