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

Large images in tables cause the tables to be cut off when exported to PDF

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

      Steps to Reproduce:

      Note: I've attached a a XML backup of a page that replicates this problem.

      1. Create a 1x2 table, and insert enough text in the right column that you would expect it to run onto a second line when exported
      2. Attach a large image to the page, and resize it to, for example, 900px
      3. Export page to pdf

      Expected Results:
      The text should wrap. Eg:

      Actual Results:
      The text runs off the page:

      Notes:
      This does not occur if the image is left in its original size.

      Workaround:
      Use sections rather than tables.

      Or make a change in PDF Stylesheet:

      img
      {
       -fs-fit-images-to-width: 100%  !important;
      }
      

            [CONFSERVER-30431] Large images in tables cause the tables to be cut off when exported to PDF

            Erica K added a comment -

            Judging by the suggested workaround, the base for PDF generation is the Flying Saucer library. It has not been updated since 2009. Good luck.

            Erica K added a comment - Judging by the suggested workaround, the base for PDF generation is the Flying Saucer library. It has not been updated since 2009. Good luck.

            Stefan Baader added a comment - - edited

            We (company running CONF 5.5. internally in our intranet for 4000 users) have similar problems with PDF Export. We are using CONF since 10 years and our experience is (unfortunately) that PDF export - a core function in CONF from the beginning - but was never really acceptable concerning the output. Hundreds of authors created hundreds of thousands of pages. Every author is using the editor functions which are provided, like image resizing and alignment.
            In our typical case there are images in a left column of a table and text in a right column (like here in the example). All images are defined to the same size in pixels (650 pixel). All images are originally larger than this defined size (around 1200 pixels width).
            One of those images was additionally defined with align=center attribute (for what reasons ever). The Confluence pages looked fine so far. Pretty nice, well formatted. That attribute align=center had the impact that this single image scaled very large in the PDF Export. All other images were as expected. The right part of the table was now cut off by the PDF format.
            We expect from a tool like CONF that those core functions like PDF Export will perform perfectly. The main strength of such a Wiki is documenting, writing manuals and guidelines. And the objective is frequently to take out that content from Confluence to another portable document format like PDF to send it to customers, service engineers, to read it offline, to archive it, etc.
            But this is only possible when the output of the PDF is in an acceptable quality. I don't complain about the typical paradigm that extremely wide tables don't fit into a DINA A4 portrait PDF output. But a slim page with resized small images and wrapping text should proceed perfectly to such a PDF Export.
            And we know that might be no problem: when using the standard print function of the browser printing into a PDF file using the PDF printer driver from Adobe we get the expected result. Why not via the built-in function of CONF?
            All workarounds are not acceptable like changing all pages in the database or manually. The risk is to high concerning the impact to the layout of those pages. A central PDF stylesheet definition will not solve anything told us Atlassian.
            So we have to wait until Atlassian will fix that bug.
            I suggest to rise the priority of that issue from minor to a higher one. In my eyes that bug is a lost of important functionality in a business document creation process.

            Stefan Baader added a comment - - edited We (company running CONF 5.5. internally in our intranet for 4000 users) have similar problems with PDF Export. We are using CONF since 10 years and our experience is (unfortunately) that PDF export - a core function in CONF from the beginning - but was never really acceptable concerning the output. Hundreds of authors created hundreds of thousands of pages. Every author is using the editor functions which are provided, like image resizing and alignment. In our typical case there are images in a left column of a table and text in a right column (like here in the example). All images are defined to the same size in pixels (650 pixel). All images are originally larger than this defined size (around 1200 pixels width). One of those images was additionally defined with align=center attribute (for what reasons ever). The Confluence pages looked fine so far. Pretty nice, well formatted. That attribute align=center had the impact that this single image scaled very large in the PDF Export. All other images were as expected. The right part of the table was now cut off by the PDF format. We expect from a tool like CONF that those core functions like PDF Export will perform perfectly. The main strength of such a Wiki is documenting, writing manuals and guidelines. And the objective is frequently to take out that content from Confluence to another portable document format like PDF to send it to customers, service engineers, to read it offline, to archive it, etc. But this is only possible when the output of the PDF is in an acceptable quality. I don't complain about the typical paradigm that extremely wide tables don't fit into a DINA A4 portrait PDF output. But a slim page with resized small images and wrapping text should proceed perfectly to such a PDF Export. And we know that might be no problem: when using the standard print function of the browser printing into a PDF file using the PDF printer driver from Adobe we get the expected result. Why not via the built-in function of CONF? All workarounds are not acceptable like changing all pages in the database or manually. The risk is to high concerning the impact to the layout of those pages. A central PDF stylesheet definition will not solve anything told us Atlassian. So we have to wait until Atlassian will fix that bug. I suggest to rise the priority of that issue from minor to a higher one. In my eyes that bug is a lost of important functionality in a business document creation process.

            Jongto licence added a comment - https://jira.atlassian.com/browse/CONF-30063

            This issue is here from 2013 ..... WTF ?

            Jongto licence added a comment - This issue is here from 2013 ..... WTF ?

            Is there a timeline for when this will be fixed? This has cost us many many hours of manual reformatting for our technical documentation. Sometimes we just have to make tables in Word and add them as appendix. This is a major issue for us.

            Alicia Newell added a comment - Is there a timeline for when this will be fixed? This has cost us many many hours of manual reformatting for our technical documentation. Sometimes we just have to make tables in Word and add them as appendix. This is a major issue for us.

            I'm approaching exactly the same problem, even with plain tables without embedded images.
            Modifying the stylesheet as proposed in an earlier thread doesn't do the job either.

            Is there any workaround, whatsoever?

            After fighting for days with cut-off images (in pdf export), that's the 2nd showstopper.
            Atlassian treats Confluence export to PDF as an orphan, IMHO.

            Reto Weiss added a comment - I'm approaching exactly the same problem, even with plain tables without embedded images. Modifying the stylesheet as proposed in an earlier thread doesn't do the job either. Is there any workaround, whatsoever? After fighting for days with cut-off images (in pdf export), that's the 2nd showstopper. Atlassian treats Confluence export to PDF as an orphan, IMHO.

            I can assure that the error still exists in 5.8.4, which is what we currently run - I'm currently installing 5.8.5, maybe another glimpse of hope...

            Oliver Margraf added a comment - I can assure that the error still exists in 5.8.4, which is what we currently run - I'm currently installing 5.8.5, maybe another glimpse of hope...

            Anna McDonald added a comment - - edited

            FYI: We are running v5.6.6 and the issue is still not fixed. I need to create PDFs of our online technical documentation for my company's Legal department and for archiving, so this is a major issue for us. When do you anticipate that this issue will be fixed?

            Anna McDonald added a comment - - edited FYI: We are running v5.6.6 and the issue is still not fixed. I need to create PDFs of our online technical documentation for my company's Legal department and for archiving, so this is a major issue for us. When do you anticipate that this issue will be fixed?

            I am facing the same problem - Will anything happen here?

            Christian Schlaefcke added a comment - I am facing the same problem - Will anything happen here?

              Unassigned Unassigned
              ldally lachland
              Affected customers:
              51 This affects my team
              Watchers:
              47 Start watching this issue

                Created:
                Updated: