Details
-
Bug
-
Resolution: Cannot Reproduce
-
Major
-
None
-
2.1.1
-
None
-
Easy
-
Description
To reproduce:
- Make sure that no pdf.css exists either in the templates dir or as an attachment to the current skin
- Create a XWiki.PDFClass (with the correct attributes as set in http://platform.xwiki.org/xwiki/bin/view/AdminGuide/Configuration#HCustomizingthePDFexportLook26Feel)
- Create a XWiki.PDFTemplate doc and add a PDFClass object to it
- Export a document, specifying the PDFTemplate as the template to use during the export (as per http://platform.xwiki.org/xwiki/bin/view/AdminGuide/Configuration#HCustomizingthePDFexportLook26Feel)
The style will not be applied until pdf.css exists. The error message in the logs is:
...bin/export/Space/DocumentName?format=pdf] WARN impl.PdfExportImpl
- Failed to apply CSS: character
org.apache.batik.css.parser.ParseException: character
at org.apache.batik.css.parser.Scanner.nextToken(Scanner.java:368)
at org.apache.batik.css.parser.Scanner.next(Scanner.java:222)
at org.apache.batik.css.parser.Parser.parseStyleSheet(Parser.java:185)
at info.informatica.doc.style.css.dom.DOMCSSStyleSheet.parseCSSStyleSheet(DOMCSSStyleSheet.java:410)
at info.informatica.doc.dom4j.XHTMLDocument.addStyleSheet(XHTMLDocument.java:131)
at com.xpn.xwiki.pdf.impl.PdfExportImpl.applyCSS(PdfExportImpl.java:377)
at com.xpn.xwiki.pdf.impl.PdfExportImpl.applyCSS(PdfExportImpl.java:332)
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:198)
at com.xpn.xwiki.web.ExportAction.render(ExportAction.java:61)
at com.xpn.xwiki.web.XWikiAction.execute(XWikiAction.java:214)
at com.xpn.xwiki.web.XWikiAction.execute(XWikiAction.java:115)