Any macro that includes rendered xhtml content with images will not be exported properly in the PDF export function. The images will simply not be included in the PDF. The same content seems to export properly if copied outside of the macro body.

      I have tested this with the following macros: info, excerpt-include, numcapt (Numbered Captions).

        1. error1a.png
          error1a.png
          85 kB
        2. error1b.pdf
          1 kB

            [CONFSERVER-41383] PDF export does not include images that are nested in macros

            @Minh what is the status for this issue?

            Jason Boileau added a comment - @Minh what is the status for this issue?

            So to be a bit more specific, Numbered Captions outputs the following (in psuedo-html):

            <div data-macro-name="captioneditem" style="display: table;">
             <span style="display: table-row;"><img /></span>
            </div>
            

            The image is not included in pdf export (but can be seen in html export or pdf export when using Scroll PDF). If I remove the styles written inline above (display: table and display: table-row), then the image is included.

            Jason Boileau added a comment - So to be a bit more specific, Numbered Captions outputs the following (in psuedo-html): <div data-macro-name= "captioneditem" style= "display: table;" > <span style= "display: table-row;" > <img /> </span> </div> The image is not included in pdf export (but can be seen in html export or pdf export when using Scroll PDF). If I remove the styles written inline above (display: table and display: table-row), then the image is included.

            Also, I still see this in Confluence 5.10.

            Jason Boileau added a comment - Also, I still see this in Confluence 5.10.

            It looks like this happens when the images are in a span that has the css "display: table-row" applied. That would appear to be a bug in the pdf renderer.

            Jason Boileau added a comment - It looks like this happens when the images are in a span that has the css "display: table-row" applied. That would appear to be a bug in the pdf renderer.

            On further examination, it appears that somehow Numbered Captions is causing this. The screenshots I attached are from a page where some Numbered Captions macros were included (which exhibited the error), where I then added info and excerpt macros that also exhibited the error. The info error persisted even after removing everything else from the page. Unfortunately, I haven't been able to reproduce the same error (for info) on another page.

            Jason Boileau added a comment - On further examination, it appears that somehow Numbered Captions is causing this. The screenshots I attached are from a page where some Numbered Captions macros were included (which exhibited the error), where I then added info and excerpt macros that also exhibited the error. The info error persisted even after removing everything else from the page. Unfortunately, I haven't been able to reproduce the same error (for info) on another page.

            Minh Tran added a comment -

            Dear jason41,

            Thanks for submitting the ticket
            Would you please give me screenshots and the pdf export attachments?

            Thanks,
            Minh Tran
            Confluence BugMaster
            Atlassian

            Minh Tran added a comment - Dear jason41 , Thanks for submitting the ticket Would you please give me screenshots and the pdf export attachments? Thanks, Minh Tran Confluence BugMaster Atlassian

              Unassigned Unassigned
              22f09878332c Jason Boileau
              Affected customers:
              5 This affects my team
              Watchers:
              6 Start watching this issue

                Created:
                Updated: