com.atlassian.confluence.importexport.ImportExportException: Exception while rendering the PDF document C:\confluence\Data\confluence_5.10.0EAP\temp\pdfexport-20160603-030616-0251-2\FT-aoshdasdh-030616-0251-3.pdf

Atlassian JIRA | Monique Khairuliana [Atlassian] | 6 months ago
  1. 0

    h3. Summary A single corrupted PNG could lead to failed export to PDF h3. Environment * Confluence Server * Confluence Cloud h3. Steps to Reproduce # Obtain sample corrupted PNG from this [ticket|https://support.atlassian.com/browse/CSP-177022] # Create a new page in Confluence # Add the PNG obtained from step 1 into the page # Save the page # Page tools > Export to PDF h3. Expected Results # PDF is successfully exported # Provide a clear error log on which image that the export had failed in h3. Actual Results The export to PDF failed, and the "System Error" page is returned with the following logs displayed: {noformat} Cause com.atlassian.confluence.importexport.ImportExportException: Exception while rendering the PDF document /data/jirastudio/confluence/j2ee_confluence_b3d0eed175f83dcecff9/home/temp/pdfexport-20160602-020616-2352-5/MTS-test1-020616-2352-6.pdf at com.atlassian.confluence.extra.flyingpdf.FlyingSaucerXmlToPdfConverter.convertXhtmlToPdf(FlyingSaucerXmlToPdfConverter.java:102) caused by: java.lang.RuntimeException: Failed to read image at com.atlassian.confluence.extra.flyingpdf.LightITextFSImage.getImage(LightITextFSImage.java:128) caused by: java.io.IOException: Corrupted PNG file. at com.lowagie.text.pdf.codec.PngImage.readPng(Unknown Source) {noformat} The stacktrace from the atlassian-confluence.log does not yield any more information: {code} -- referer: http://localhost:15100/confluence/pages/editpage.action?pageId=557060 | url: /confluence/rest/api/content/557060 | traceId: 22fc8a2e783d1cda | userName: admin 2016-06-03 02:52:00,447 ERROR [http-nio-15100-exec-9] [atlassian.confluence.servlet.ConfluenceServletDispatcher] sendError Could not execute action -- url: /confluence/spaces/flyingpdf/pdfpageexport.action | traceId: 80b8fc1c6e6a9db8 | userName: admin | referer: http://localhost:15100/confluence/display/FT/aoshdasdh com.atlassian.confluence.importexport.ImportExportException: Exception while rendering the PDF document C:\confluence\Data\confluence_5.10.0EAP\temp\pdfexport-20160603-030616-0251-2\FT-aoshdasdh-030616-0251-3.pdf at com.atlassian.confluence.extra.flyingpdf.FlyingSaucerXmlToPdfConverter.convertXhtmlToPdf(FlyingSaucerXmlToPdfConverter.java:102) at com.atlassian.confluence.extra.flyingpdf.FlyingSaucerXmlToPdfConverter.convertXhtmlToPdf(FlyingSaucerXmlToPdfConverter.java:49) ... 350 more Caused by: java.io.IOException: Corrupted PNG file. ... 360 more {code} h3.Workaround Identify the corrupted PNG file and delete it from the page

    Atlassian JIRA | 6 months ago | Monique Khairuliana [Atlassian]
    com.atlassian.confluence.importexport.ImportExportException: Exception while rendering the PDF document C:\confluence\Data\confluence_5.10.0EAP\temp\pdfexport-20160603-030616-0251-2\FT-aoshdasdh-030616-0251-3.pdf
  2. 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
  3. Speed up your debug routine!

    Automated exception search integrated into your IDE

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

    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. java.io.IOException

      Corrupted PNG file.

      at com.atlassian.confluence.extra.flyingpdf.FlyingSaucerXmlToPdfConverter.convertXhtmlToPdf()
    2. com.atlassian.confluence
      FlyingSaucerXmlToPdfConverter.convertXhtmlToPdf
      1. com.atlassian.confluence.extra.flyingpdf.FlyingSaucerXmlToPdfConverter.convertXhtmlToPdf(FlyingSaucerXmlToPdfConverter.java:102)
      2. com.atlassian.confluence.extra.flyingpdf.FlyingSaucerXmlToPdfConverter.convertXhtmlToPdf(FlyingSaucerXmlToPdfConverter.java:49)
      2 frames