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

Images not included in PDF Export of JIRA Issue/Filter macro

    XMLWordPrintable

Details

    Description

      NOTE: This bug report is for Confluence Server. Using Confluence Cloud? See the corresponding bug report.

      Summary

      Images are not included in the PDF Export of Jira cases embedded in a confluence page using the Jira Issue/Filter macro.

      Steps to replicate:

      1. Create a new Bug in Jira
      2. Attach an image to the Jira Bug and embed in the Description field
      3. Create a new page in confluence
      4. Add JIRA Issue/Filter macro to the page and configure the filter to include the Jira Bug and display Description field.
      5. Save page
      6. Select Export to PDF

      Expected Behaviour

      Image from the Jira Bug should be included in the PDF

      Actual Behaviour

      The image isn't included in the PDF. The rest of the description text looks as expected

      Workarounds

      (Submitted by customers in the comments)

      Workaround 1 - Using CSS
      1. Add CSS in an HTML macro to clean up the formatting.  I have used the 'Include Page' macro so that this html code is in a template page and can be easily added to any page that will be exported.  I used the following CSS code (note: I have no experience with CSS so if anyone can clean this up, please advise):
        1. table.aui, td, th {border-bottom: 1px solid lightgrey;padding: 10px;vertical-align:top;}
          1. Formats the JIRA tables similar to how they appear in Confluence.
        2. table {border-collapse: collapse;}
          1. Single line table border (I don't know if this one is needed)
        3. table.aui {width:100%;}
          1. JIRA tables stretch the full page width like in Confluence
        4. h1 {padding-top:12px;padding-bottom:6px;}
          1. Spacing around headers
        5. h2 {padding-top:6px;padding-bottom:3px;}
          1. Spacing around headers
        6. div.pageSection.group:not(#comments-section){display: none;}
          1. Hide attachments section which is shown during HTML export
        7. #footer-logo {display:none;}
          1. Hides an Atlassian logo that overlaps another Atlassian logo
      2. Export HTML
        1. Space Tools -> Content Tools -> Export -> HTML -> Custom Export
        2. Select the relevant page and export
      3. Save as PDF (I used Chrome)
      Workaround 2 - Editing hosts file

      The workaround was to add the proxy to the hosts file in 127.0.0.1, this fixed the PDF issues, I also have the Word issue, this might be due to other macros/plugin content or scripts in the page, go ahead and create a simple page with content and images, it will be able to download the Word document, the problem for me is the extra macros and template changes (theme customization plugin).

      127.0.0.1 jira.yourdomain.com

      Notes

      (Submitted by a customer in the comments)

      1. Confluence doesn't seem to be able to export ANY image that is hosted locally.
      2. Confluence correctly generates the URLs to the images and these URLs are accessible just fine. However, Confluence seems to think, that the images are available on the local file system rather than using an HTTP download. (There seems to be either a DownloadResourceManager missing or the URLs are wrongly interpreted to use the IconDownloadResourceManager)

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              de45d39f557e Andrew Halligan
              Votes:
              102 Vote for this issue
              Watchers:
              83 Start watching this issue

              Dates

                Created:
                Updated: