Background images on PDF do not render correctly when using PDF macro

Still need help?

The Atlassian Community is here for you.

Ask the community

Platform notice: Server and Data Center only. This article only applies to Atlassian products on the Server and Data Center platforms.

Support for Server* products ended on February 15th 2024. If you are running a Server product, you can visit the Atlassian Server end of support announcement to review your migration options.

*Except Fisheye and Crucible

 

Workaround listed on this page is valid only for confluence versions 5.3-5.8. If your version is outside of this version workaround won't help.

Problem

After inserting a PDF into a Page in Confluence, parts of the PDF image do not render. In this example there should be a background image but instead it is just dark gray:

 

 

The following appears in the atlassian-confluence.log:

WARN [http-bio-5553-exec-4] [com.benryan.conversion.PPTSlideServlet] doGet Conversion task timed out for attachment : File_Name.pdf with page number 0, 
waited : 300, now executing in background.

Workaround

Disabling this memory guard can cause OutOutMemoryErrors if a high resolution image is embedded in a PDF. 

 

  1. Open <confluence_install>/bin/setenv.sh in the editor of your choice
  2. Find the line that starts with JAVA_OPTS=
    • For example, the line may look like JAVA_OPTS="-Xms1024m -Xmx1024m -XX:MaxPermSize=512m $JAVA_OPTS -Djava.awt.headless=true "
  3. Add the following to the end of the line: -Dpdf.render.memory.guard.disabled=true
    • For example, the line will now be: JAVA_OPTS="-Xms1024m -Xmx1024m -XX:MaxPermSize=512m $JAVA_OPTS -Djava.awt.headless=true -Dpdf.render.memory.guard.disabled=true "
  4. Save the setting.sh file.
  5. Restart confluence
  6. Navigate to the page with the PDF attached to it, remove the embedded PDF macro and delete the attachment (or you could simply delete the page and recreate)
  7. Re-attach the PDF

Resolution

Currently unresolved, see  CONF-33763 - Getting issue details... STATUS  for more information or to leave comments.

Last modified on Nov 2, 2018

Was this helpful?

Yes
No
Provide feedback about this article
Powered by Confluence and Scroll Viewport.