Uploaded image for project: 'Confluence Cloud'
  1. Confluence Cloud
  2. CONFCLOUD-82718

When images with considerable size are used in the adfExport function in the Macro Module, fail to load when exported.

XMLWordPrintable

      Issue Summary

      The Macro module on Forge: Macro allows a function to be defined to be used in the property adfExoport and defines the export view of the macro, specified in Atlassian document format

      When that function returns an ADF (Atlassian Document Format), using the node media: Node - media and in that media node, the attrs.type is defined to be 'external' depending on the size of the externally sourced image; the action to export the page where the macro is defined fails to properly load it before outputting the PDF document.

      Steps to Reproduce

      1. Create a Forge app using the macro module and define an adfExport function
      2. Have the adfExport function return a structure that includes externally sourced images
        1. return {
             type: 'doc',
             version: 1,
             content: [
                {
                   type: 'mediaGroup',
                   content: [
                      {
                         type: 'media',
                         attrs: {
                             type: 'external',
                             url: '< insert here the externally sourced image>',
                         }
                    },
                    {
                       type: 'media',
                       attrs: {
                          type: 'external',
                          url: '< insert here the externally sourced image>',
                       }
                    }  
                   ]
                }
             ]
          }
      1. Deploy and install the app in a Confluence instance, add that macro to a Confluence page, and export it to PDF.
      2. If the images are large enough (over 2 or 3 megas), the generated PDF will contain a load spinner instead of the actual image.

      Expected Results

      The PDF export should have a mechanism that detects when the externally sourced images are fully received/loaded/rendered before outputting the PDF.

      Actual Results

      The generated PDF contains load spinners instead of the actual content.

       

      Workaround

      Currently there is no known workaround for this behavior. A workaround will be added here when available

              Unassigned Unassigned
              6f0957aa1bcc Emmanuel Bellezza
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Created:
                Updated: