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

      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

            [CONFSERVER-39128] Images in Word or Excel documents (displayed via the View File Macro) does not appear in PDF exports

            Shekhar Gupta made changes -
            Description Original: h3. 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

            h3. 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.
            {quote}
            !screen1.png|thumbnail!
            {quote}
            {*}Step-3{*}. Publish the page and images are visible when viewing the page
            {quote}
            !screen2.png|thumbnail!
            {quote}
            {*}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]

            h3. Expected Results
            Images should appear in PDF export

            h3. Actual Results
            Images are missing in PDF export

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

            h3. Note
            In the logs, we could see the following exception.
            {code:java}
            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)
            {code}
            {code:java}
            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
            {code}
            {code:java}
            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
            {code}
            New: h3. 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

            h3. 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.
            {quote}
            !screen1.png|thumbnail!
            {quote}
            {*}Step-3{*}. Publish the page and images are visible when viewing the page
            {quote}
            !screen2.png|thumbnail!
            {quote}
            {*}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]

            h3. Expected Results
            Images should appear in PDF export

            h3. Actual Results
            Images are missing in PDF export

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

            h3. Note
            In the logs, we could see the following exception with sandbox debug logging (com.atlassian.confluence.impl.util.sandbox).
            {code:java}
            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)
            {code}
            {code:java}
            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
            {code}
            {code:java}
            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
            {code}
            Shekhar Gupta made changes -
            Attachment New: screen2.png [ 480773 ]
            Attachment New: screen1.png [ 480772 ]
            Shekhar Gupta made changes -
            Attachment New: TestWordDoc.docx [ 480771 ]
            Attachment New: pdfExport.pdf [ 480770 ]
            Attachment New: StorageFormat.txt [ 480669 ]
            Shekhar Gupta made changes -
            Description Original: {panel:bgColor=#e7f4fa}
              *NOTE:* This bug report is for *Confluence Server*. Using *Confluence Cloud*? [See the corresponding bug report|http://jira.atlassian.com/browse/CONFCLOUD-39128].
              {panel}

            # create a word document with an image
            # embed this document on a confluence page
            ## the image is visible when browsing the page
            # export the confluence page (either word or pdf)
            ## the image is _not_ visible in the export

            there is a related issue CONF-25599 concerning _only word_ exports.
            Thus I assumed pdf export should actually work, but it does not.
            Images generated by other plugins, like e.g. gliffy, are at least visible on the pdf exports (although word is not working either).

            I also tried to include the image directly into the page (i.e. without wrapping it into a word document). In this case it is indeed visible on the pdf-export.

            I attached a test document as well.
            New: h3. 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

            h3. 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.
            {quote}
            !screen1.png|thumbnail!
            {quote}
            {*}Step-3{*}. Publish the page and images are visible when viewing the page
            {quote}
            !screen2.png|thumbnail!
            {quote}
            {*}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]

            h3. Expected Results
            Images should appear in PDF export

            h3. Actual Results
            Images are missing in PDF export

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

            h3. Note
            In the logs, we could see the following exception.
            {code:java}
            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)
            {code}
            {code:java}
            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
            {code}
            {code:java}
            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
            {code}
            Shekhar Gupta made changes -
            Summary Original: when a page with an embedded office document with images is exported, the images are missing in the export New: Images in Word or Excel documents (displayed via the View File Macro) does not appear in PDF exports
            Shekhar Gupta made changes -
            Reporter Original: celix Solutions GmbH [ celixsupport ] New: Shekhar Gupta [ 2ff3e5e81230 ]
            SET Analytics Bot made changes -
            Support reference count Original: 4 New: 5
            SET Analytics Bot made changes -
            UIS Original: 1 New: 0
            SET Analytics Bot made changes -
            UIS New: 1
            SET Analytics Bot made changes -
            Support reference count Original: 3 New: 4

              Unassigned Unassigned
              2ff3e5e81230 Shekhar Gupta
              Affected customers:
              3 This affects my team
              Watchers:
              10 Start watching this issue

                Created:
                Updated: