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

PDF export with png image cannot be read with Adobe Reader

      Often when I use 'export space' to export a large part of my space, the generated pdf file does not load in Adobe Reader (6 or 7, Windows XP).

      The error message is: "There was an error processing a page. There was a problem reading this document (109).

        1. mat_create.png
          mat_create.png
          13 kB
        2. sceeatg-20050722-01_25_01.pdf
          21 kB
        3. SANDBOX-20,549-20050728-01_15_57.pdf
          15 kB
        4. exampleimage.png
          exampleimage.png
          32 kB

            [CONFSERVER-3609] PDF export with png image cannot be read with Adobe Reader

            Matt Ryall added a comment -

            Confluence 3.0 includes a new PDF export subsystem that fixes this problem.

            Matt Ryall added a comment - Confluence 3.0 includes a new PDF export subsystem that fixes this problem.

            Hi all

            I also got the same problem and i enquired about the same and found that there might be a problem of images, on normal pdfs images should be in RGB format but problem facers may have images in CMYK format. i got the solution by changing images from CMYK to RGB format.

            Thanks
            Janny

            Janny Isabal added a comment - Hi all I also got the same problem and i enquired about the same and found that there might be a problem of images, on normal pdfs images should be in RGB format but problem facers may have images in CMYK format. i got the solution by changing images from CMYK to RGB format. Thanks Janny

            Could not replicate with:

            • JRocket JVM under Standalone or Tomcat
            • JIMI library removed

            May need to replicate as completely as possible. Possible ideas

            • Ask Contegix to setup a new Conf standalone in their env
            • Setup same everything locally, eg Resin, PostgreSQL, JRocket.

            Dave Soul

            David Soul [Atlassian] added a comment - Could not replicate with: JRocket JVM under Standalone or Tomcat JIMI library removed May need to replicate as completely as possible. Possible ideas Ask Contegix to setup a new Conf standalone in their env Setup same everything locally, eg Resin, PostgreSQL, JRocket. Dave Soul

            Example problem PNG attached

            David Soul [Atlassian] added a comment - Example problem PNG attached

            This issue appears only to occur on instances with JIMI library, so apparently is related to either JIMI library bug in PNG support, or lack of support for certain PNGs. Error has been encountered on CAC, which uses JIMI library but not JAI. Further testing is needed.

            If encountered, the current workaround is to install the JAI from http://java.sun.com/products/java-media/jai/

            David Soul

            David Soul [Atlassian] added a comment - This issue appears only to occur on instances with JIMI library, so apparently is related to either JIMI library bug in PNG support, or lack of support for certain PNGs. Error has been encountered on CAC, which uses JIMI library but not JAI. Further testing is needed. If encountered, the current workaround is to install the JAI from http://java.sun.com/products/java-media/jai/ David Soul

            2.2.8 is generating corrupt PDF exports for pages containing PNG images. No log errors are thrown by Confluence but the PDF file generates error 109 when opened in Acrobat Reader. An example PDF and problem PNG is attached (71 DPI with 32 bit colour). This error is blocking the CAC User Guide PDF.

            David Soul [Atlassian] added a comment - 2.2.8 is generating corrupt PDF exports for pages containing PNG images. No log errors are thrown by Confluence but the PDF file generates error 109 when opened in Acrobat Reader. An example PDF and problem PNG is attached (71 DPI with 32 bit colour). This error is blocking the CAC User Guide PDF.

            jens added a comment -

            Since it only seems to fail with specific png files, it is not really a dependency. However, we will add it to our documentation to make customers aware of the fact that the JAI library might be required.

            Thanks for letting us know.

            Cheers,
            Jens

            jens added a comment - Since it only seems to fail with specific png files, it is not really a dependency. However, we will add it to our documentation to make customers aware of the fact that the JAI library might be required. Thanks for letting us know. Cheers, Jens

            Installing JAI helped. I had to restart Confluence, though.

            It is worth to mention dependency on JAI in Confluence documentation, since FOP information message is confusing. Version 0.20.5 does have JAI support, according to their website.

            Andrew: this will be available on our main site tomorrow LA time

            Dzmitry Zhemchuhou added a comment - Installing JAI helped. I had to restart Confluence, though. It is worth to mention dependency on JAI in Confluence documentation, since FOP information message is confusing. Version 0.20.5 does have JAI support, according to their website. Andrew: this will be available on our main site tomorrow LA time

            jens added a comment -

            Thanks for the excerpt of your logs.

            Some of our users have found that finding the file confluence/WEB-INF/lib/JimiProClasses.zip, renaming it to JimiProClasses.jar and then restarting Confluence actually makes the export work successfully.

            However I'm quite sure JimiProClasses.zip was renamed to .jar in 1.4.1 and therefore this shouldn't be the problem. Please check it anyway whether there is a zip file or a jar.

            I couldn't find any bug report regarding PNG images with a specific resolution, but the problem might well be related to Jimi since it seems to have problems loading the image. Alternatively you could install JAI [1] to see if this specific PNG format is supported by the Java Advanced Imaging API.

            Hope that helps,

            Cheers,
            Jens

            [1] Java Advanced Imaging API (http://java.sun.com/products/java-media/jai/forDevelopers/jaifaq.html)

            jens added a comment - Thanks for the excerpt of your logs. Some of our users have found that finding the file confluence/WEB-INF/lib/JimiProClasses.zip, renaming it to JimiProClasses.jar and then restarting Confluence actually makes the export work successfully. However I'm quite sure JimiProClasses.zip was renamed to .jar in 1.4.1 and therefore this shouldn't be the problem. Please check it anyway whether there is a zip file or a jar. I couldn't find any bug report regarding PNG images with a specific resolution, but the problem might well be related to Jimi since it seems to have problems loading the image. Alternatively you could install JAI [1] to see if this specific PNG format is supported by the Java Advanced Imaging API. Hope that helps, Cheers, Jens [1] Java Advanced Imaging API ( http://java.sun.com/products/java-media/jai/forDevelopers/jaifaq.html )

            This is an excerpt from catalina.out:

            [INFO] JAI support was not installed (read: not present at build time). Trying to use Jimi instead
            [ERROR] Error in XObject : Error while loading image file://var/lib/confluence/temp/export_07292005_175825/mat_create.png : class ja
            va.lang.Exception - Image error
            [INFO] Parsing of document complete, stopping renderer

            Dzmitry Zhemchuhou added a comment - This is an excerpt from catalina.out: [INFO] JAI support was not installed (read: not present at build time). Trying to use Jimi instead [ERROR] Error in XObject : Error while loading image file://var/lib/confluence/temp/export_07292005_175825/mat_create.png : class ja va.lang.Exception - Image error [INFO] Parsing of document complete, stopping renderer

            single page export.

            Andrew Ostler added a comment - single page export.

            jens added a comment -

            Hi Andrew,

            You can find a little pdf icon at the top right of every page underneath the search button. This allows you to export the page to pdf with one click.
            However, I have tried to make a single page export via the space export and were also able to view the pdf in Acrobat Reader 6.0.

            Can you attach the created pdf document so I can try to open it over here?

            Cheers,
            Jens

            jens added a comment - Hi Andrew, You can find a little pdf icon at the top right of every page underneath the search button. This allows you to export the page to pdf with one click. However, I have tried to make a single page export via the space export and were also able to view the pdf in Acrobat Reader 6.0. Can you attach the created pdf document so I can try to open it over here? Cheers, Jens

            Hi,

            I must admit to not being able to find the button to export a single page - where should it be?

            But I've done an 'export space', restricting the export to that single page, and it won't load when exported.

            If I load the image into an editor and resave with a different DPI, then upload to confluence and export exactly the same page, then the pdf works fine.

            cheers,
            os.

            Andrew Ostler added a comment - Hi, I must admit to not being able to find the button to export a single page - where should it be? But I've done an 'export space', restricting the export to that single page, and it won't load when exported. If I load the image into an editor and resave with a different DPI, then upload to confluence and export exactly the same page, then the pdf works fine. cheers, os.

            jens added a comment -

            Andrew,

            we have tested a single page pdf export with the image you attached to this issue and it was no problem to open the resulting pdf in Acrobat Reader 6.0 on Windows XP. Have you tried a single page export to see if the page with the image included is failing to be opened in Acrobat?

            Would you be able to provide a space backup so we could try to reproduce the problem locally?

            Where did you get the idea that the image is the root of the problem?

            Cheers,
            Jens

            jens added a comment - Andrew, we have tested a single page pdf export with the image you attached to this issue and it was no problem to open the resulting pdf in Acrobat Reader 6.0 on Windows XP. Have you tried a single page export to see if the page with the image included is failing to be opened in Acrobat? Would you be able to provide a space backup so we could try to reproduce the problem locally? Where did you get the idea that the image is the root of the problem? Cheers, Jens

            Apparently this is due to png images with an unusual dpi setting (72.009 dpi).

            Please see the attached png image and pdf.

            thanks,
            os.

            Andrew Ostler added a comment - Apparently this is due to png images with an unusual dpi setting (72.009 dpi). Please see the attached png image and pdf. thanks, os.

            Hi Andrew,

            It sounds like there is some content being converted into PDF that is not valid on acrobat 6 or 7. It would be great if you could help us investigate this issue a little bit by,

            a) generate the pdf that failing, and rather than opening it from within your browser, save it to disk and then open it. I have seen reports that mention this error in the same sentence as problems with the IE pdf plugin.
            b) can you try to isolate the page/pages that are causing the problem. ie, when you find a PDF file that is generating this error, remove some of the pages until you have narrowed down the offending page(s). If possible, can you send us the wiki text of those pages. This will allow us to isolate wiki markup that is responsible for causing the invalid PDF content. Alternatively, if you dont have time for this, is it possible to send us the space backup for a space that is consistently generating this error?

            Regards,
            -Daniel

            Daniel Ostermeier added a comment - Hi Andrew, It sounds like there is some content being converted into PDF that is not valid on acrobat 6 or 7. It would be great if you could help us investigate this issue a little bit by, a) generate the pdf that failing, and rather than opening it from within your browser, save it to disk and then open it. I have seen reports that mention this error in the same sentence as problems with the IE pdf plugin. b) can you try to isolate the page/pages that are causing the problem. ie, when you find a PDF file that is generating this error, remove some of the pages until you have narrowed down the offending page(s). If possible, can you send us the wiki text of those pages. This will allow us to isolate wiki markup that is responsible for causing the invalid PDF content. Alternatively, if you dont have time for this, is it possible to send us the space backup for a space that is consistently generating this error? Regards, -Daniel

              Unassigned Unassigned
              8068fd49a4f7 Andrew Ostler
              Affected customers:
              1 This affects my team
              Watchers:
              3 Start watching this issue

                Created:
                Updated:
                Resolved: