com.atlassian.confluence.importexport.ImportExportException: Failed to create a location and file for the PDF export.

Atlassian JIRA | Isaac Davidson | 3 years ago
  1. 0

    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) ...

    Atlassian JIRA | 3 years ago | Isaac Davidson
    com.atlassian.confluence.importexport.ImportExportException: Failed to create a location and file for the PDF export.
  2. 0

    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) ...

    Atlassian JIRA | 3 years ago | Isaac Davidson
    com.atlassian.confluence.importexport.ImportExportException: Failed to create a location and file for the PDF export.
  3. 0

    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.

    Atlassian JIRA | 5 years ago | Joe Wai Tye [Atlassian]
    com.atlassian.confluence.importexport.ImportExportException: Failed to create a location and file for the PDF export.
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    [CONF-34275] Could Not Export to PDF with Space Details Macro - Atlassian JIRA

    atlassian.com | 1 year ago
    com.atlassian.confluence.importexport.ImportExportException: Exception rendering the PDF document C:\confluence\data-5.5.2\temp\pdfexport-20140715-150714-1626-19\PE-12189697-150714-1626-20.pdf
  6. 0

    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}

    Atlassian JIRA | 7 years ago | Roy Hartono [Atlassian]
    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

    Not finding the right solution?
    Take a tour to get the most out of Samebug.

    Tired of useless tips?

    Automated exception search integrated into your IDE

    Root Cause Analysis

    1. com.atlassian.confluence.importexport.ImportExportException

      Failed to create a location and file for the PDF export.

      at com.atlassian.confluence.extra.flyingpdf.FlyingSaucerXmlToPdfConverter.convertXhtmlToPdf()
    2. com.atlassian.confluence
      ExportPageAsPdfAction.execute
      1. com.atlassian.confluence.extra.flyingpdf.FlyingSaucerXmlToPdfConverter.convertXhtmlToPdf(FlyingSaucerXmlToPdfConverter.java:53)
      2. com.atlassian.confluence.extra.flyingpdf.FlyingSaucerXmlToPdfConverter.convertXhtmlToPdf(FlyingSaucerXmlToPdfConverter.java:39)
      3. com.atlassian.confluence.extra.flyingpdf.FlyingSaucerPdfExporterService.createPdfForPage(FlyingSaucerPdfExporterService.java:98)
      4. com.atlassian.confluence.extra.flyingpdf.ExportPageAsPdfAction.execute(ExportPageAsPdfAction.java:27)
      4 frames
    3. XWork Tiger Extensions
      DefaultActionInvocation.invoke
      1. com.opensymphony.xwork.DefaultActionInvocation.invoke(DefaultActionInvocation.java:168)
      1 frame