Uploaded image for project: 'Confluence Cloud'
  1. Confluence Cloud
  2. CONFCLOUD-70968

Images and macros are being cut-off when a page is exported to PDF

      Issue Summary

      When erxporting pages to PDF the end result contain cut-off images, macros and large tables. It seems that page breaks are not being considered when exporting a page to PDF.

      Steps to Reproduce

      1. Create a page containing some images (I was able to reproduce with 8 large images);
      2. Add a Table of content macro, some headings, and some info panels between images;
      3. Publish the page and export it to PDF

      Expected Results

      • Content of the page to be correctly segregated on page breaks.

      Actual Results

      • Content (images/macros) are cut off on the exported PDF files, as can be seen in this screenshot here:

      reference PDF: ITS-PDFExporttest-201020-1459.pdf

      Workaround

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

            [CONFCLOUD-70968] Images and macros are being cut-off when a page is exported to PDF

            Jonathan Huet added a comment - - edited

            TL&DR: Possible solution: make the size of the image of 851px

            Complete:

            I had the same issue and nothing fixed it:

            • PNG to JPG
            •  -fs-fit-images-to-width: 100% !important;

            But I had an image of 851px that was respecting the page break, and then I set all the other images to that width and all worked as a charm, even the tables that was also cut in the middle of a page. 

            Probably, 851px is not a magic number, but it seems to be a matter of sizes

            I hope it will be useful for you too!  

            Jonathan Huet added a comment - - edited TL&DR: P ossible solution: make the size of the image of 851px Complete: I had the same issue and nothing fixed it: PNG to JPG   -fs-fit-images-to-width: 100% !important; But I had an image of 851px that was respecting the page break, and then I set all the other images to that width and all worked as a charm, even the tables that was also cut in the middle of a page.  Probably, 851px is not a magic number, but it seems to be a matter of sizes I hope it will be useful for you too!  

            Nicolò Spito added a comment - - edited
            • Still have problem when I export a page as PDF:

            No way to obtain a right PDF export.

            Nicolò Spito added a comment - - edited Still have problem when I export a page as PDF: No way to obtain a right PDF export.

            Hi! Is only the cut off "box" fixed and the images are still "broken"?

            In our project the images are still cut in half if they begin right before the page break.

            Michael Ricklefs added a comment - Hi! Is only the cut off "box" fixed and the images are still "broken"? In our project the images are still cut in half if they begin right before the page break.

            The fix is now available in production, closing the bug.

            Tushar Mahule added a comment - The fix is now available in production, closing the bug.

            PR has been merged to staging, waiting for release to prod.

             

            This code change will solve the info panel cutoff issue in the attachments.

             

            Martin Maza added a comment - PR has been merged to staging, waiting for release to prod.   This code change will solve the info panel cutoff issue in the attachments.  

            f7ae1d98cc50 halegra , can i get access to the sample page?

            I'm trying to understand the above example, was the issue that there was an info panel getting cutoff?  

            Martin Maza added a comment - f7ae1d98cc50 halegra , can i get access to the sample page? I'm trying to understand the above example, was the issue that there was an info panel getting cutoff?  

            Hi, this is affecting reporting workflow as this issue has not been seen nor acted upon. Can someone assist???

            Genesis Canizales added a comment - Hi, this is affecting reporting workflow as this issue has not been seen nor acted upon. Can someone assist???

            https://getsupport.atlassian.com/browse/CES-13969

            Its affecting customer very badly

            Vinod Reddy added a comment - https://getsupport.atlassian.com/browse/CES-13969 Its affecting customer very badly

            Gregor Steinhagen added a comment - - edited

            Based on or old page structure, we already had an ugly workaround which we went back to:

            1. Post the content into an excerpt box
            2. Collect the content on another page from this excerpt box
            3. (Optional) Change the PDF Export Template to get rid of the excerpt frames in the PDF appearing with excerpt boxes

            For us this approach worked. The excerpt boxes keep images in one piece. May be in the near future in a Galaxy not to far away, Atlassian will fix the problem itself and we do not have to rely on this page structure.

            Gregor Steinhagen added a comment - - edited Based on or old page structure, we already had an ugly workaround which we went back to: 1. Post the content into an excerpt box 2. Collect the content on another page from this excerpt box 3. (Optional) Change the PDF Export Template to get rid of the excerpt frames in the PDF appearing with excerpt boxes For us this approach worked. The excerpt boxes keep images in one piece. May be in the near future in a Galaxy not to far away, Atlassian will fix the problem itself and we do not have to rely on this page structure.

            Following on from the last comment, we also have this issue and we would be glad if it would be fixed. We strongly rely on PDF exports for customers in data centers or remote locations, where no permanent internet connections exists. Images and macros are cut off in a way which is inconvenient to view or read.

            Thomas Staiger added a comment - Following on from the last comment, we also have this issue and we would be glad if it would be fixed. We strongly rely on PDF exports for customers in data centers or remote locations, where no permanent internet connections exists. Images and macros are cut off in a way which is inconvenient to view or read.

              3fc9a08d5c87 Martin Maza
              halegra Helton A. (Inactive)
              Affected customers:
              22 This affects my team
              Watchers:
              48 Start watching this issue

                Created:
                Updated:
                Resolved: