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

Make the PDF export less fragile

    XMLWordPrintable

Details

    • Unknown
    • N/A
    • N/A

    Description

      Right now the process is the following (see http://platform.xwiki.org/xwiki/bin/view/AdminGuide/Configuration#HCustomizingthePDFexportLook26Feel for more details):

      • 1) Render the document to export as XHTML --> xmlA
      • 2) Apply some pdf CSS using CSS4J to xmlA --> xmlB
      • 3) Apply an XSL stylesheet to xmlB to generate XSL-FO (xhtml2fo.xsl) --> xmlC
      • 4) Apply another XSL stylesheet to perform some cleanup to xmlC --> xmlD
      • 5) Call FOP on xmlD to generate the PDF

      One major issue is that FOP requires a valid XSL-FO input and will fail with an exception if that's not the case, and our xhtml2fo.xsl content is transforming XHTML and removing unknown properties but it cannot know all unknown properties.

      There can be problems during steps 2 and 3/4.

      Example of problem in step 2:

      Example of problem in step 3/4:

      Attachments

        Issue Links

          Activity

            People

              vmassol Vincent Massol
              vmassol Vincent Massol
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: