com.atlassian.confluence.importexport.ImportExportException: Exception while rendering the PDF document /data/jirastudio/confluence/home/temp/pdfexport-20150925-250915-1458-137/IRISDOC-Clients-250915-1458-138.pdf

There are no available Samebug tips for this exception. Do you have an idea how to solve this issue? A short tip would help users who saw this issue last week.

  • h3. Summary Confluence pages without any character on the page cannot be exported to PDF. !Screen Shot 2015-09-25 at 9.56.45 AM.png|thumbnail! h3. Environment * Confluence Cloud h3. Steps to Reproduce # Create a Confluence page # Add a tittle, but no content # Save the page and then try exporting to PDF h3. Expected Results PDF file is generated h3. Actual Results {code}Cause com.atlassian.confluence.importexport.ImportExportException: Exception while rendering the PDF document /data/jirastudio/confluence/home/temp/pdfexport-20150925-250915-1458-137/IRISDOC-Clients-250915-1458-138.pdf at com.atlassian.confluence.extra.flyingpdf.FlyingSaucerXmlToPdfConverter.convertXhtmlToPdf(FlyingSaucerXmlToPdfConverter.java:102) caused by: java.lang.IndexOutOfBoundsException: Index: 0, Size: 0 at java.util.ArrayList.rangeCheck(ArrayList.java:653) Stack Trace:[hide] com.atlassian.confluence.importexport.ImportExportException: Exception while rendering the PDF document /data/jirastudio/confluence/home/temp/pdfexport-20150925-250915-1458-137/IRISDOC-Clients-250915-1458-138.pdf at com.atlassian.confluence.extra.flyingpdf.FlyingSaucerXmlToPdfConverter.convertXhtmlToPdf(FlyingSaucerXmlToPdfConverter.java:102) at com.atlassian.confluence.extra.flyingpdf.FlyingSaucerXmlToPdfConverter.convertXhtmlToPdf(FlyingSaucerXmlToPdfConverter.java:49) at com.atlassian.confluence.extra.flyingpdf.FlyingSaucerPdfExporterService.createPdfForPage(FlyingSaucerPdfExporterService.java:111) at com.atlassian.confluence.extra.flyingpdf.ExportPageAsPdfAction.execute(ExportPageAsPdfAction.java:27) at com.opensymphony.xwork.DefaultActionInvocation.invoke(DefaultActionInvocation.java:168){code} !Screen Shot 2015-09-25 at 9.58.52 AM.png|thumbnail! h3.Workaround -
    via by Paula Silveira [Atlassian],
  • h3. Summary Confluence pages without any character on the page cannot be exported to PDF. !Screen Shot 2015-09-25 at 9.56.45 AM.png|thumbnail! h3. Environment * Confluence Cloud h3. Steps to Reproduce # Create a Confluence page # Add a tittle, but no content # Save the page and then try exporting to PDF h3. Expected Results PDF file is generated h3. Actual Results {code}Cause com.atlassian.confluence.importexport.ImportExportException: Exception while rendering the PDF document /data/jirastudio/confluence/home/temp/pdfexport-20150925-250915-1458-137/IRISDOC-Clients-250915-1458-138.pdf at com.atlassian.confluence.extra.flyingpdf.FlyingSaucerXmlToPdfConverter.convertXhtmlToPdf(FlyingSaucerXmlToPdfConverter.java:102) caused by: java.lang.IndexOutOfBoundsException: Index: 0, Size: 0 at java.util.ArrayList.rangeCheck(ArrayList.java:653) Stack Trace:[hide] com.atlassian.confluence.importexport.ImportExportException: Exception while rendering the PDF document /data/jirastudio/confluence/home/temp/pdfexport-20150925-250915-1458-137/IRISDOC-Clients-250915-1458-138.pdf at com.atlassian.confluence.extra.flyingpdf.FlyingSaucerXmlToPdfConverter.convertXhtmlToPdf(FlyingSaucerXmlToPdfConverter.java:102) at com.atlassian.confluence.extra.flyingpdf.FlyingSaucerXmlToPdfConverter.convertXhtmlToPdf(FlyingSaucerXmlToPdfConverter.java:49) at com.atlassian.confluence.extra.flyingpdf.FlyingSaucerPdfExporterService.createPdfForPage(FlyingSaucerPdfExporterService.java:111) at com.atlassian.confluence.extra.flyingpdf.ExportPageAsPdfAction.execute(ExportPageAsPdfAction.java:27) at com.opensymphony.xwork.DefaultActionInvocation.invoke(DefaultActionInvocation.java:168){code} !Screen Shot 2015-09-25 at 9.58.52 AM.png|thumbnail! h3.Workaround -
    via by Paula Silveira [Atlassian],
  • When using the following CSS to hide page title: {code} div.pagetitle:first-child { visibility:hidden } {code} Attempt to create PDF export will produce a stack trace: {noformat} com.atlassian.confluence.importexport.ImportExportException: Exception while rendering the PDF document C:\confluence\standalone\mysql\data-3.0.0_01\temp\pdfexport-20091201-145808-3\sand-1835016-145808-4.pdf at com.atlassian.confluence.extra.flyingpdf.FlyingSaucerXmlToPdfConverter.convertXhtmlToPdf(FlyingSaucerXmlToPdfConverter.java:111) at com.atlassian.confluence.extra.flyingpdf.FlyingSaucerXmlToPdfConverter.convertXhtmlToPdf(FlyingSaucerXmlToPdfConverter.java:38) at com.atlassian.confluence.extra.flyingpdf.FlyingSaucerPdfExporterService.createPdfForPage(FlyingSaucerPdfExporterService.java:68) at com.atlassian.confluence.extra.flyingpdf.ExportPageAsPdfAction.execute(ExportPageAsPdfAction.java:20) 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.opensymphony.xwork.interceptor.DefaultWorkflowInterceptor.intercept(DefaultWorkflowInterceptor.java:55) {noformat} The *visibility:hidden* parameter cannot be used either. No stack trace, but the whole content will be invisible along with the page title. The work around is to make the text colour the same as the background colour (assuming your background colour is white): {code} div.pagetitle:first-child { color:white; } {code}
    via by Roy Hartono [Atlassian],
  • If the title of a page in Confluence contains the colon character then it fails when a user attempts to use "Export to PDF" on a page when Confluence is running on Windows as it attempts to use the invalid character in the generated PDF's file name. {panel:title=example character} : {panel} The result is a System Error page with the following... h3. Cause com.atlassian.confluence.importexport.ImportExportException: Failed to create a location and file for the PDF export. at com.atlassian.confluence.extra.flyingpdf.FlyingSaucerXmlToPdfConverter.convertXhtmlToPdf(FlyingSaucerXmlToPdfConverter.java:53) caused by: java.io.IOException: The filename, directory name, or volume label syntax is incorrect at java.io.WinNTFileSystem.canonicalize0(Native Method) h3. Stack Trace: com.atlassian.confluence.importexport.ImportExportException: Failed to create a location and file for the PDF export. at com.atlassian.confluence.extra.flyingpdf.FlyingSaucerXmlToPdfConverter.convertXhtmlToPdf(FlyingSaucerXmlToPdfConverter.java:53) at com.atlassian.confluence.extra.flyingpdf.FlyingSaucerXmlToPdfConverter.convertXhtmlToPdf(FlyingSaucerXmlToPdfConverter.java:39) at com.atlassian.confluence.extra.flyingpdf.FlyingSaucerPdfExporterService.createPdfForPage(FlyingSaucerPdfExporterService.java:98) at com.atlassian.confluence.extra.flyingpdf.ExportPageAsPdfAction.execute(ExportPageAsPdfAction.java:27) at com.opensymphony.xwork.DefaultActionInvocation.invoke(DefaultActionInvocation.java:168) ...
    via by Isaac Davidson,
  • When you try to export a page with the below scripts to PDF file, you will face the following System Error: {code} 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) {code} 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: {code} #cover { background: url("") no-repeat scroll center center #026890; position: absolute; color: #ffffff; height: 100%; } {code} 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.
    via by Giuliano Campos [Atlassian],
  • h3. Summary of Bug If the name of a page has a ':' symbol in between two words (for example, "Exercise 1 : Bugs"), or, in front of a word (for example, ": Bugs") the PDF export will fail and return a stack trace. h3. Steps to Reproduce # Create a page and ensure that the name has a ':' symbol in between two words (or with the ':' symbol in front of words) # Save the page # Try to export it to PDF h3. Findings *Stack trace* The stack trace is as follows : {noformat} java.io.IOException: The filename, directory name, or volume label syntax is incorrect at java.io.WinNTFileSystem.canonicalize0(Native Method) at java.io.Win32FileSystem.canonicalize(Win32FileSystem.java:396) at java.io.File.getCanonicalPath(File.java:559) at com.atlassian.confluence.extra.flyingpdf.ExportPageAsPdfAction.prepareDownloadPath(ExportPageAsPdfAction.java:65) at com.atlassian.confluence.extra.flyingpdf.ExportPageAsPdfAction.execute(ExportPageAsPdfAction.java:35) 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.opensymphony.xwork.interceptor.DefaultWorkflowInterceptor.intercept(DefaultWorkflowInterceptor.java:55) at com.atlassian.confluence.core.ConfluenceWorkflowInterceptor.intercept(ConfluenceWorkflowInterceptor.java:37) at com.opensymphony.xwork.DefaultActionInvocation.invoke(DefaultActionInvocation.java:165) at com.opensymphony.xwork.interceptor.AroundInterceptor.intercept(AroundInterceptor.java:35) at com.opensymphony.xwork.DefaultActionInvocation.invoke(DefaultActionInvocation.java:165) at com.atlassian.xwork.interceptors.XsrfTokenInterceptor.intercept(XsrfTokenInterceptor.java:100) at com.atlassian.confluence.xwork.ConfluenceXsrfTokenInterceptor.intercept(ConfluenceXsrfTokenInterceptor.java:25) at com.opensymphony.xwork.DefaultActionInvocation.invoke(DefaultActionInvocation.java:165) at com.atlassian.confluence.security.interceptors.CaptchaInterceptor.intercept(CaptchaInterceptor.java:49) at com.opensymphony.xwork.DefaultActionInvocation.invoke(DefaultActionInvocation.java:165) at com.opensymphony.xwork.interceptor.AroundInterceptor.intercept(AroundInterceptor.java:35) at com.opensymphony.xwork.DefaultActionInvocation.invoke(DefaultActionInvocation.java:165) at com.opensymphony.xwork.interceptor.AroundInterceptor.intercept(AroundInterceptor.java:35) at com.opensymphony.xwork.DefaultActionInvocation.invoke(DefaultActionInvocation.java:165) at com.atlassian.confluence.util.LoggingContextInterceptor.intercept(LoggingContextInterceptor.java:49) at com.opensymphony.xwork.DefaultActionInvocation.invoke(DefaultActionInvocation.java:165) at com.atlassian.confluence.core.CancellingInterceptor.intercept(CancellingInterceptor.java:23) at com.opensymphony.xwork.DefaultActionInvocation.invoke(DefaultActionInvocation.java:165) at com.atlassian.confluence.security.websudo.WebSudoInterceptor.intercept(WebSudoInterceptor.java:61) at com.opensymphony.xwork.DefaultActionInvocation.invoke(DefaultActionInvocation.java:165) at com.atlassian.confluence.security.actions.PermissionCheckInterceptor.intercept(PermissionCheckInterceptor.java:57) at com.opensymphony.xwork.DefaultActionInvocation.invoke(DefaultActionInvocation.java:165) at com.atlassian.confluence.setup.webwork.BootstrapAwareInterceptor.intercept(BootstrapAwareInterceptor.java:26) {noformat} *Conditions for reproducing the bug* It seems that if there is nothing after the ':' symbol, the bug will not appear. For example, if the name of the page is "Exercise 1 :", then the page can be exported to PDF format smoothly.
    via by Joe Wai Tye [Atlassian],
  • If the title of a page in Confluence contains the colon character then it fails when a user attempts to use "Export to PDF" on a page when Confluence is running on Windows as it attempts to use the invalid character in the generated PDF's file name. {panel:title=example character} : {panel} The result is a System Error page with the following... h3. Cause com.atlassian.confluence.importexport.ImportExportException: Failed to create a location and file for the PDF export. at com.atlassian.confluence.extra.flyingpdf.FlyingSaucerXmlToPdfConverter.convertXhtmlToPdf(FlyingSaucerXmlToPdfConverter.java:53) caused by: java.io.IOException: The filename, directory name, or volume label syntax is incorrect at java.io.WinNTFileSystem.canonicalize0(Native Method) h3. Stack Trace: com.atlassian.confluence.importexport.ImportExportException: Failed to create a location and file for the PDF export. at com.atlassian.confluence.extra.flyingpdf.FlyingSaucerXmlToPdfConverter.convertXhtmlToPdf(FlyingSaucerXmlToPdfConverter.java:53) at com.atlassian.confluence.extra.flyingpdf.FlyingSaucerXmlToPdfConverter.convertXhtmlToPdf(FlyingSaucerXmlToPdfConverter.java:39) at com.atlassian.confluence.extra.flyingpdf.FlyingSaucerPdfExporterService.createPdfForPage(FlyingSaucerPdfExporterService.java:98) at com.atlassian.confluence.extra.flyingpdf.ExportPageAsPdfAction.execute(ExportPageAsPdfAction.java:27) at com.opensymphony.xwork.DefaultActionInvocation.invoke(DefaultActionInvocation.java:168) ...
    via by Isaac Davidson,
  • When you try to export a page with the below scripts to PDF file, you will face the following System Error: {code} 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) {code} 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: {code} #cover { background: url("") no-repeat scroll center center #026890; position: absolute; color: #ffffff; height: 100%; } {code} 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.
    via by Giuliano Campos [Atlassian],
    • com.atlassian.confluence.importexport.ImportExportException: Exception while rendering the PDF document /data/jirastudio/confluence/home/temp/pdfexport-20150925-250915-1458-137/IRISDOC-Clients-250915-1458-138.pdf at com.atlassian.confluence.extra.flyingpdf.FlyingSaucerXmlToPdfConverter.convertXhtmlToPdf(FlyingSaucerXmlToPdfConverter.java:102) at com.atlassian.confluence.extra.flyingpdf.FlyingSaucerXmlToPdfConverter.convertXhtmlToPdf(FlyingSaucerXmlToPdfConverter.java:49) at com.atlassian.confluence.extra.flyingpdf.FlyingSaucerPdfExporterService.createPdfForPage(FlyingSaucerPdfExporterService.java:111) at com.atlassian.confluence.extra.flyingpdf.ExportPageAsPdfAction.execute(ExportPageAsPdfAction.java:27)
    No Bugmate found.