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

      Symptoms:

      • If image is embedded into file then it won't be displayed.
      • Scanned PDF document (which is effectively consists of single embedded image) won't be displayed at all.
      • There is next log statement in logs: WARN [DefaultSlideCacheManager:thread-1] [com.benryan.conversion.MemoryAwarePDFRenderer] drawImage Image of size 2464*3448 px dropped for memory protection

      Reason:

      • Image rendering takes considerable amount of memory and makes some OD instances crash.
      • Temporary workaround applied on confluence side is to have image rendering disabled if image is large.

      OD workaround:
      At the moment there is no workaround for OD (OnDemand) customers except scan documents into JPEG format instead of pdf. We're are plan to roll out on better memory calculation algorithm and better handling of concurrent macro rendering however there is no ETA.

      BTF workaround:
      For BTF (Behind The Firewall) admins could start confluence with -Dpdf.render.memory.guard.disabled=true property in order to disable memory guard. That will make all pdfs to be rendered.
      Note: Disabling this memory guard can cause OutOfMemoryErrors if a high resolution image is embedded in a PDF.

      EDIT 21/04/2015
      Current pdf macro is deprecated and replaced by `Files and Images` (available from toolbar). More details are onto https://confluence.atlassian.com/display/Cloud/Displaying+Files+and+Images

      Update 23/11/2015
      Condition was reversed. You won't need to put system property and by default images size within pdf is not limited for BTF installations.

        1. Custompostcard_final_2014.pdf
          1.46 MB
        2. log.txt
          54 kB
        3. PDF thumbnail error.png
          PDF thumbnail error.png
          10 kB
        4. screenshot.png
          screenshot.png
          30 kB

            [CONFSERVER-33763] Large embedded images are not displayed within pdf macro

            Patrick added a comment -

            The Workaround is still valid for 7.8.3

            Patrick added a comment - The Workaround is still valid for 7.8.3

            Edwyn Stapel added a comment - - edited

            In the logging we are seeing this mention for confluence version 5.9.6 -

            for pptx and pdf.

             

            the preview of the files are ok i think, but memory seems to be filling up.

            Edwyn Stapel added a comment - - edited In the logging we are seeing this mention for confluence version 5.9.6 - for pptx and pdf.   the preview of the files are ok i think, but memory seems to be filling up.

            I see this issue was included in the Bug fixes in the 5.9 release notes (https://confluence.atlassian.com/doc/confluence-5-9-release-notes-785333580.html), but I just installed this version and the bug still exists.

            Cheryl Fogle added a comment - I see this issue was included in the Bug fixes in the 5.9 release notes ( https://confluence.atlassian.com/doc/confluence-5-9-release-notes-785333580.html ), but I just installed this version and the bug still exists.

            We are using version 5.8.4 and are still experiencing this problem for scanned pdf documents. I have implemented the -Dpdf.render.memory.guard.disabled=true workaround both in the setenv.bat and in the registry and this has not resolved the issue. Are there any other suggestions? This is becoming a larger issue for us by the day.

            Cheryl Fogle added a comment - We are using version 5.8.4 and are still experiencing this problem for scanned pdf documents. I have implemented the -Dpdf.render.memory.guard.disabled=true workaround both in the setenv.bat and in the registry and this has not resolved the issue. Are there any other suggestions? This is becoming a larger issue for us by the day.

            Ah I see, yeah no, sorry... I assumed it was actually fixed and didn't need the workaround. Thanks, will check out the workaround... Best would be if this made its way into a release I guess

            Tim Mohrbach added a comment - Ah I see, yeah no, sorry... I assumed it was actually fixed and didn't need the workaround. Thanks, will check out the workaround... Best would be if this made its way into a release I guess

            tim181 are you using -Dpdf.render.memory.guard.disabled=true sys property workaround?

            Petro Semeniuk (Inactive) added a comment - tim181 are you using -Dpdf.render.memory.guard.disabled=true sys property workaround?

            I'm running confluence 5.8.6 and still have this issue. How can this be resolved in 5.7 if it still occurs in 5.8?

            Tim Mohrbach added a comment - I'm running confluence 5.8.6 and still have this issue. How can this be resolved in 5.7 if it still occurs in 5.8?

            Hi joe.westcott@itdp.org, that's correct. I mentioned this Improvement Request for a conversion tool on the other bug we spoke on, but I'm just pasting it here for the information of others who might have the same question: CONF-32097
            In terms of how to convert existing pages, you can do so manually - edit the page, go to Insert > Files and Images and select the document.

            Denise Unterwurzacher [Atlassian] (Inactive) added a comment - Hi joe.westcott@itdp.org , that's correct. I mentioned this Improvement Request for a conversion tool on the other bug we spoke on, but I'm just pasting it here for the information of others who might have the same question: CONF-32097 In terms of how to convert existing pages, you can do so manually - edit the page, go to Insert > Files and Images and select the document.

            It seems that Confluence does not upgrade the View File macro into the new embedded preview type. What is the recommended solution for this?

            Joe Westcott (ITDP) added a comment - It seems that Confluence does not upgrade the View File macro into the new embedded preview type. What is the recommended solution for this?

            Thank you everyone for your feedback. In a recent release of Confluence (5.7) we introduced a new way to embed, preview and collaborate on files (more information here). This new experience does not require you to insert a macro first, but automatically embeds a preview of the file if you upload it. In addition, it supports many more file types and additional features which are not available in the View File macro. All future efforts on improving our files experience will be on the new solution.

            This bug does not exist in our new file experience and we encourage you to transition your embedded view file macro into an embedded file to make use of the new file functionality. Given that the bug does not occur in the new file experience, we will be closing this issue.

            Denise Unterwurzacher [Atlassian] (Inactive) added a comment - Thank you everyone for your feedback. In a recent release of Confluence (5.7) we introduced a new way to embed, preview and collaborate on files (more information here ). This new experience does not require you to insert a macro first, but automatically embeds a preview of the file if you upload it. In addition, it supports many more file types and additional features which are not available in the View File macro. All future efforts on improving our files experience will be on the new solution. This bug does not exist in our new file experience and we encourage you to transition your embedded view file macro into an embedded file to make use of the new file functionality. Given that the bug does not occur in the new file experience, we will be closing this issue.

              psemeniuk Petro Semeniuk (Inactive)
              psemeniuk Petro Semeniuk (Inactive)
              Affected customers:
              26 This affects my team
              Watchers:
              36 Start watching this issue

                Created:
                Updated:
                Resolved: