-
Type:
Bug
-
Resolution: Obsolete
-
Priority:
Medium
-
None
-
Affects Version/s: 4.1.4, 4.2.2, 5.1.4
-
Component/s: Editor - Page / Comment Editor
-
43
-
Severity 2 - Major
When you try to export a page with the below scripts to PDF file, you will face the following System Error:
Cause com.atlassian.confluence.importexport.ImportExportException: Exception while rendering the PDF document D:\Confluence\data\temp\pdfexport-20130701-010713-1406-1\DCAM-CAConfigurationAutomation(CCA)SupportReadinessTraining-010713-1406-2.pdf at com.atlassian.confluence.extra.flyingpdf.FlyingSaucerXmlToPdfConverter.convertXhtmlToPdf(FlyingSaucerXmlToPdfConverter.java:110) caused by: java.lang.StringIndexOutOfBoundsException: String index out of range: 0 at java.lang.String.charAt(Unknown Source) Stack Trace:[hide] com.atlassian.confluence.importexport.ImportExportException: Exception while rendering the PDF document D:\Confluence\data\temp\pdfexport-20130701-010713-1406-1\DCAM-CAConfigurationAutomation(CCA)SupportReadinessTraining-010713-1406-2.pdf at com.atlassian.confluence.extra.flyingpdf.FlyingSaucerXmlToPdfConverter.convertXhtmlToPdf(FlyingSaucerXmlToPdfConverter.java:110) at com.atlassian.confluence.extra.flyingpdf.FlyingSaucerXmlToPdfConverter.convertXhtmlToPdf(FlyingSaucerXmlToPdfConverter.java:38) at com.atlassian.confluence.extra.flyingpdf.FlyingSaucerPdfExporterService.createPdfForPage(FlyingSaucerPdfExporterService.java:78) at com.atlassian.confluence.extra.flyingpdf.ExportPageAsPdfAction.execute(ExportPageAsPdfAction.java:28)
The script experiencing issues is attached as a text file in order to reproduce the same behaviour in different Confluence instances.
*In this specific case the workaround is to remove the following code from the script:
#cover {
background: url("") no-repeat scroll center center #026890;
position: absolute;
color: #ffffff;
height: 100%;
}
One of the customer also found out that @font-face rule in CSS is causing the same error too.
Removing this will work to remedy the problem, but I believe Confluence needs to handle more gracefully PDF page export with HTML macro embedded.