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

Images in Word or Excel documents (displayed via the View File Macro) does not appear in PDF exports

XMLWordPrintable

      Issue Summary

      When exporting a page to PDF that includes Word or Excel documents displayed through the Office Word Macro or Office Excel Macro, we encounter an issue where images are missing from the export.

      This is reproducible on Data Center: Yes

      Steps to Reproduce

      Step-1. Created a Confluence 9.2.0 environment
      Step-2. Created a page and added a word document containing images with the Office Word Macro.

      Step-3. Publish the page and images are visible when viewing the page

      Step-4. Generate a page PDF export and we can see the images are missing

      Attaching the sample storage format, sample word document and pdf export for reference.
      StorageFormat.txt
      TestWordDoc.docx
      pdfExport.pdf

      Expected Results

      Images should appear in PDF export

      Actual Results

      Images are missing in PDF export

      Workaround

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

      Note

      In the logs, we could see the following exception with sandbox debug logging (com.atlassian.confluence.impl.util.sandbox).

      2025-01-22 05:13:03,990 WARN [http-nio-8090-exec-1 url: /confluence/plugins/servlet/benryanconversion] [atlassian.confluence.servlet.ServletModuleContainerServlet] service Access check is failed. Skipping Servlet com.benryan.conversion.HtmlImageServlet
       -- url: /confluence/plugins/servlet/benryanconversion | userName: anonymous | traceId: ef873ffb5d3b297d
      2025-01-22 05:13:03,993 ERROR [http-nio-8090-exec-1 url: /confluence/plugins/servlet/benryanconversion] [ContainerBase.[Standalone].[localhost].[/confluence]] log Unhandled exception occurred whilst decorating page
       -- url: /confluence/plugins/servlet/benryanconversion | userName: anonymous | traceId: ef873ffb5d3b297d
      com.atlassian.sal.api.permission.AuthorisationException
      	at com.atlassian.confluence.servlet.ServletModuleContainerServlet.service(ServletModuleContainerServlet.java:103)
      
      2025-01-22 05:13:04,005 ERROR [http-nio-8090-exec-1] [[Standalone].[localhost].[/confluence].[servlet-module-container-servlet]] log Servlet.service() for servlet [servlet-module-container-servlet] in context with path [/confluence] threw exception
      
      2025-01-22 05:13:05,050 INFO [sandbox-logger] [impl.util.sandbox.ConversionSandbox] lambda$buildConfig$0 worker1: Can't get image resource for uri/confluence/plugins/servlet/benryanconversion?pageId=2588676&attachment=TestWordDoc.docx&name=2588678&val=/image-1.png, error: Unknown image format
      

        1. imagetest.doc
          173 kB
        2. pdfExport.pdf
          1 kB
        3. screen1.png
          screen1.png
          981 kB
        4. screen2.png
          screen2.png
          1.63 MB
        5. StorageFormat.txt
          0.3 kB
        6. TestWordDoc.docx
          1.76 MB

              Unassigned Unassigned
              2ff3e5e81230 Shekhar Gupta
              Votes:
              3 Vote for this issue
              Watchers:
              10 Start watching this issue

                Created:
                Updated: