XWiki Platform
  1. XWiki Platform
  2. XWIKI-5918

Impossible to override XSLT documents used in the PDF export process

    Details

    • Type: Bug Bug
    • Status: Closed Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 3.0 M1
    • Fix Version/s: 3.0 M2
    • Component/s: {Unused} Export
    • Labels:
      None
    • Difficulty:
      Unknown
    • Similar issues:

      Description

      The documentation at http://platform.xwiki.org/xwiki/bin/view/AdminGuide/Configuration#HCustomizingthePDFexportLook26Feel doesn't actually work when it comes to overriding the xhtml2fo.xsl and fop.xsl stylesheets.

      Although the implementation suggests that the xhtmlxsl and fopxsl properties of the XWiki.PDFClass class is supposed to contain the actual content of the xslt file, it is actually used as the name of a filesystem resource.

        Activity

        Hide
        Sergiu Dumitriu added a comment -

        Fixed in r34252.

        Show
        Sergiu Dumitriu added a comment - Fixed in r34252.
        Sergiu Dumitriu made changes -
        Field Original Value New Value
        Status Open [ 1 ] Closed [ 6 ]
        Assignee Sergiu Dumitriu [ sdumitriu ]
        Fix Version/s 3.0 M2 [ 11903 ]
        Resolution Fixed [ 1 ]
        Marta Girdea made changes -
        Link This issue blocks CPLUS-63 [ CPLUS-63 ]
        Guillaume Fenollar made changes -
        Link This issue blocks CPLUS-63 [ CPLUS-63 ]
        Hide
        Anca Luca added a comment -

        Actually this issue introduces a problem, the fact that, not even the standard xhtml2fo.xsl file fits in the property without modifications (minification), let alone customized one, since the limit for texarea properties in the mapping is set to 60 000 characters, so this 'fix' is slightly useless as is.

        Lucky enough, a detail which is not mentioned in the documentation, is that you can have velocity in this field, which allows you to put the desired xsl in an attachment somewhere (skin or pdftemplate sounds like good places to put it), and get its content with velocity, something like:

        $xwiki.getDocument('MyApp.PDFTemplate').getAttachment('xhtml2fo-myapp.xsl').contentAsString
        
        Show
        Anca Luca added a comment - Actually this issue introduces a problem, the fact that, not even the standard xhtml2fo.xsl file fits in the property without modifications (minification), let alone customized one, since the limit for texarea properties in the mapping is set to 60 000 characters, so this 'fix' is slightly useless as is. Lucky enough, a detail which is not mentioned in the documentation, is that you can have velocity in this field, which allows you to put the desired xsl in an attachment somewhere (skin or pdftemplate sounds like good places to put it), and get its content with velocity, something like: $xwiki.getDocument('MyApp.PDFTemplate').getAttachment('xhtml2fo-myapp.xsl').contentAsString

          People

          • Assignee:
            Sergiu Dumitriu
            Reporter:
            Sergiu Dumitriu
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:
              Date of First Response: