Uploaded image for project: 'Confluence Data Center'
  1. Confluence Data Center
  2. CONFSERVER-55114

PDF page export can't retrieve image link if inserted as web url or contains JIRA link

    XMLWordPrintable

Details

    Description

      Summary

      PDF export can't retrieve image link referred from Jira issue and external web URL

      Steps to Reproduce

      Scenario 1

      1. Upload attachment to a Jira issue
      2. Copy image address
      3. On confluence, create a page
      4. Insert Image using link copied from Jira image attached
      5. Publish page
      6. Export to PDF

      Scenario 2

      1. Create confluence page
      2. Add image using Web URL for external image
      3. Publish page
      4. Export to PDF

      Expected Results

      PDF export successfully including image

      Actual Results

      Scenario 1

      The below exception is thrown in confluence.log and PDF is not generated:

      2018-03-05 10:58:32,581 ERROR [http-nio-8090-exec-7] [atlassian.confluence.servlet.ConfluenceServletDispatcher] sendError Could not execute action
       -- url: /spaces/flyingpdf/pdfpageexport.action | traceId: 7d875de856d6047b | userName: admin | referer: http://192.168.100.102:8090/display/SAR/test+image+from+jiralink
      com.atlassian.confluence.importexport.ImportExportException: Exception while rendering the PDF document /atlassian-conf6/Home-directory/temp/pdfexport-20180305-050318-1058-7/SAR-testimagefromjiralink-050318-1058-8.pdf
       at com.atlassian.confluence.extra.flyingpdf.FlyingSaucerXmlToPdfConverter.convertXhtmlToPdf(FlyingSaucerXmlToPdfConverter.java:104)
       at com.atlassian.confluence.extra.flyingpdf.FlyingSaucerXmlToPdfConverter.convertXhtmlToPdf(FlyingSaucerXmlToPdfConverter.java:54)
       at com.atlassian.confluence.extra.flyingpdf.FlyingSaucerPdfExporterService.createPdfForPage(FlyingSaucerPdfExporterService.java:95)
       at com.atlassian.confluence.extra.flyingpdf.ExportPageAsPdfAction.doExecute(ExportPageAsPdfAction.java:40)
       at com.atlassian.confluence.extra.flyingpdf.ExportPageAsPdfAction.execute(ExportPageAsPdfAction.java:29)
       at com.opensymphony.xwork.DefaultActionInvocation.invoke(DefaultActionInvocation.java:168)
       at com.opensymphony.xwork.interceptor.AroundInterceptor.intercept(AroundInterceptor.java:35)
      
      Caused by: java.lang.RuntimeException: Failed to read image
      

      Scenario 2

      PDF export successfully without image

      Workaround

      Upload the image as an attachment to the page and export to PDF again

      Notes

      • Export to Word is successful and includes the remote image.
      • To reproduce the issue, you can use the attached video.

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              srezkalla@atlassian.com Sarah Rezkalla (Inactive)
              Votes:
              18 Vote for this issue
              Watchers:
              20 Start watching this issue

              Dates

                Created:
                Updated: