Details

    • Type: Bug Bug
    • Status: Closed Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 3.0 M3
    • Component/s: {Unused} Export
    • Labels:
      None
    • Difficulty:
      Unknown
    • Similar issues:
      XWIKI-6045Title of a pdf document which is an export of a translated page is the title of the default language version of the page
      XWIKI-10001Add a new option "title" during a PDF export
      XWIKI-223PDF export fails with unescaped angle brackets
      XWIKI-8274A bad image can break the PDF export
      XWIKI-185Line breaks inside {code} ... {code} tags are incorrectly rendered in PDF
      XWIKI-6546Expose the PDF export options to the user
      XWIKI-2376Exporting to PDF does not work correctly with #includeForm
      XWIKI-7132An anchor link goes to the original document instead of being an internal link.
      XWIKI-3886Using XML symbols (<, >, &) inside the document title/name/space breaks various parts of the UI and causes the PDF export to throw exceptions
      XWIKI-5161Using XML symbols (<, >, &, ") inside the document title/name/space breaks various parts of the UI and causes the PDF export to throw exceptions

      Description

      The following content seem to make the PDF export Fail:

      = id name="_RefA"{{/id}}A =

      Here is a stack trace with no more info:

      Detailed information:

      Error number 11015 in 11: Exception while exporting
      Wrapped Exception: Error number 12003 in 12: XSL Transformation Failed
      Wrapped Exception: Premature end of file.
      com.xpn.xwiki.XWikiException: Error number 11015 in 11: Exception while exporting
      Wrapped Exception: Error number 12003 in 12: XSL Transformation Failed
      Wrapped Exception: Premature end of file.
      at com.xpn.xwiki.web.ExportAction.render(ExportAction.java:67)
      at com.xpn.xwiki.web.XWikiAction.execute(XWikiAction.java:214)
      at com.xpn.xwiki.web.XWikiAction.execute(XWikiAction.java:115)
      at org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:431)
      at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:236)
      at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1196)
      at org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:414)
      at javax.servlet.http.HttpServlet.service(HttpServlet.java:617)
      at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
      at com.xpn.xwiki.wysiwyg.server.filter.ConversionFilter.doFilter(ConversionFilter.java:152)
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
      at com.xpn.xwiki.web.ActionFilter.doFilter(ActionFilter.java:118)
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
      at com.xpn.xwiki.plugin.webdav.XWikiDavFilter.doFilter(XWikiDavFilter.java:68)
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
      at com.xpn.xwiki.web.SavedRequestRestorerFilter.doFilter(SavedRequestRestorerFilter.java:295)
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
      at com.xpn.xwiki.web.SetCharacterEncodingFilter.doFilter(SetCharacterEncodingFilter.java:112)
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
      at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
      at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
      at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
      at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
      at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
      at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:286)
      at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:845)
      at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583)
      at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
      at java.lang.Thread.run(Thread.java:619)

      Wrapped Exception:

      com.xpn.xwiki.XWikiException: Error number 12003 in 12: XSL Transformation Failed
      Wrapped Exception: Premature end of file.
      at com.xpn.xwiki.pdf.impl.PdfExportImpl.applyXsl(PdfExportImpl.java:316)
      at com.xpn.xwiki.pdf.impl.PdfExportImpl.convertXHtmlToXMLFO(PdfExportImpl.java:294)
      at com.xpn.xwiki.pdf.impl.PdfExportImpl.exportXHtml(PdfExportImpl.java:178)
      at com.xpn.xwiki.pdf.impl.PdfExportImpl.exportHtml(PdfExportImpl.java:235)
      at com.xpn.xwiki.pdf.impl.PdfExportImpl.export(PdfExportImpl.java:266)
      at com.xpn.xwiki.web.ExportAction.exportPDFOrRTF(ExportAction.java:196)
      at com.xpn.xwiki.web.ExportAction.render(ExportAction.java:64)
      at com.xpn.xwiki.web.XWikiAction.execute(XWikiAction.java:214)
      at com.xpn.xwiki.web.XWikiAction.execute(XWikiAction.java:115)
      at org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:431)
      at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:236)
      at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1196)
      at org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:414)
      at javax.servlet.http.HttpServlet.service(HttpServlet.java:617)
      at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
      at com.xpn.xwiki.wysiwyg.server.filter.ConversionFilter.doFilter(ConversionFilter.java:152)
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
      at com.xpn.xwiki.web.ActionFilter.doFilter(ActionFilter.java:118)
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
      at com.xpn.xwiki.plugin.webdav.XWikiDavFilter.doFilter(XWikiDavFilter.java:68)
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
      at com.xpn.xwiki.web.SavedRequestRestorerFilter.doFilter(SavedRequestRestorerFilter.java:295)
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
      at com.xpn.xwiki.web.SetCharacterEncodingFilter.doFilter(SetCharacterEncodingFilter.java:112)
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
      at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
      at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
      at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
      at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
      at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
      at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:286)
      at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:845)
      at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583)
      at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
      at java.lang.Thread.run(Thread.java:619)

        Issue Links

          Activity

          Hide
          Sergiu Dumitriu added a comment -

          This particular case is caused by XWIKI-5113, since the id macro generates a div inside the span that is always present inside the h1 (and other headings) element.

          In general, we should do two things: get rid of the span inside the heading, but this will break older skins; and try to improve the PDF export workflow so that the document is properly cleaned even in cases where block elements are inside inline elements.

          Show
          Sergiu Dumitriu added a comment - This particular case is caused by XWIKI-5113 , since the id macro generates a div inside the span that is always present inside the h1 (and other headings) element. In general, we should do two things: get rid of the span inside the heading, but this will break older skins; and try to improve the PDF export workflow so that the document is properly cleaned even in cases where block elements are inside inline elements.
          Hide
          Marta Girdea added a comment -

          This seems (almost) fixed on 2.7.1. The PDF is generated without exceptions, but the id is displayed in the title as visibe HTML

          <div id="_RefA"></div>A
          Show
          Marta Girdea added a comment - This seems (almost) fixed on 2.7.1. The PDF is generated without exceptions, but the id is displayed in the title as visibe HTML <div id="_RefA"></div>A
          Hide
          Sergiu Dumitriu added a comment -

          Fixed along the way by XWIKI-5922, XWIKI-6046, XWIKI-3886.

          Show
          Sergiu Dumitriu added a comment - Fixed along the way by XWIKI-5922 , XWIKI-6046 , XWIKI-3886 .
          Hide
          Sergiu Dumitriu added a comment -

          r35013 adds another fix for a rare case when JTidy completely fails to clean the document and returns an empty string. PDF Export should work in almost all cases now.

          Next step: replace JTidy with HTMLCleaner.

          Show
          Sergiu Dumitriu added a comment - r35013 adds another fix for a rare case when JTidy completely fails to clean the document and returns an empty string. PDF Export should work in almost all cases now. Next step: replace JTidy with HTMLCleaner.

            People

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

              Dates

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