Unable to Export to PDF due to Invalid CSS
Symptoms
When exporting Page or Space to PDF, the following appears in the atlassian-confluence.log
:
2012-09-26 22:48:02,605 ERROR [http-8443-8] [atlassian.confluence.servlet.ConfluenceServletDispatcher] sendError Could not execute action
-- url: /spaces/flyingpdf/pdfpageexport.action | userName: admin | referer: https://confluence/display/SANDBOX/Excel+Export+Test
com.atlassian.confluence.importexport.ImportExportException: Exception while rendering the PDF document /opt/app/confluence/data/temp/pdfexport-20120926-260912-2248-1/SANDBOX-ExcelExportTest-260912-2248-2.pdf
at com.atlassian.confluence.extra.flyingpdf.FlyingSaucerXmlToPdfConverter.convertXhtmlToPdf(FlyingSaucerXmlToPdfConverter.java:111)
at com.atlassian.confluence.extra.flyingpdf.FlyingSaucerXmlToPdfConverter.convertXhtmlToPdf(FlyingSaucerXmlToPdfConverter.java:39)
at com.atlassian.confluence.extra.flyingpdf.FlyingSaucerPdfExporterService.createPdfForPage(FlyingSaucerPdfExporterService.java:78)
at com.atlassian.confluence.extra.flyingpdf.ExportPageAsPdfAction.execute(ExportPageAsPdfAction.java:28)
at com.opensymphony.xwork.DefaultActionInvocation.invoke(DefaultActionInvocation.java:168)
at com.opensymphony.xwork.interceptor.AroundInterceptor.intercept(AroundInterceptor.java:35)
at com.opensymphony.xwork.DefaultActionInvocation.invoke(DefaultActionInvocation.java:165)
at com.atlassian.confluence.core.ConfluenceWorkflowInterceptor.intercept(ConfluenceWorkflowInterceptor.java:64)
....
Caused by: java.lang.IllegalArgumentException: Font size too small: 0.0
at com.lowagie.text.pdf.PdfContentByte.setFontAndSize(Unknown Source)
at org.xhtmlrenderer.pdf.ITextOutputDevice.drawString(ITextOutputDevice.java:485)
at org.xhtmlrenderer.pdf.ITextTextRenderer.drawString(ITextTextRenderer.java:42)
....
Cause
The export fails due to invalid Stylesheet set in your Confluence Admin or Space Admin.
Resolution
- Remove the PDF Stylesheet in Confluence Admin > Global PDF Stylesheet and Space Admin > PDF Stylesheet
- Try to export to PDF again
Last modified on Mar 30, 2016
Powered by Confluence and Scroll Viewport.