Uploaded image for project: 'Confluence'
  1. Confluence
  2. CONF-22263

PDF export doesn't render the content of a code macro inside an include macro

    Details

    • Last commented by user?:
      true
    • Sub-Component:
      Editor - Macros

      Description

      When you have two pages with the macro code and in one of them you insert a include macro pointing to the other page which contains the code macro renders correctly, but when you export the page, it doesn't show the include macro with the other page.

      Example: Page A contains

      test
      

      Page B contains

      {include:A}
      test2
      

      When you export page B to pdf, it will only show 'test2' and not 'test'

        Attachments

          Issue Links

            Activity

            Hide
            rhukspu Matthias added a comment -

            This also affects version 4.0

            Show
            rhukspu Matthias added a comment - This also affects version 4.0
            Hide
            jclark@atlassian.com Joe Clark added a comment -

            This is fixed in Advanced Macros Plugin version 2.0.30 available for download from plugins.atlassian.com - https://plugins.atlassian.com/plugin/details/145?versionId=767102

            Show
            jclark@atlassian.com Joe Clark added a comment - This is fixed in Advanced Macros Plugin version 2.0.30 available for download from plugins.atlassian.com - https://plugins.atlassian.com/plugin/details/145?versionId=767102
            Hide
            nata.ramanenka Nata added a comment -

            I have found a workaround for the code bug.
            1) Disable the built-in code plugin.
            2) Create a new user macro with the name "code". It should generate wiki markup like this:

            {html}
            <div style="line-break:strict !important; white-space: pre !important; font-family:courier !important; border-style:dashed !important; padding:0px 10px 10px 10px !important; border-color:grey; border-width:1px; border-radius: 3px; overflow: auto;">
            <b style="position:relative; top: 0px;">$body</b>
            </div>{html}

            3) Define the style for code in PDF.

            Maybe this can help someone.

            Show
            nata.ramanenka Nata added a comment - I have found a workaround for the code bug. 1) Disable the built-in code plugin. 2) Create a new user macro with the name "code". It should generate wiki markup like this: {html} <div style="line-break:strict !important; white-space: pre !important; font-family:courier !important; border-style:dashed !important; padding:0px 10px 10px 10px !important; border-color:grey; border-width:1px; border-radius: 3px; overflow: auto;"> <b style="position:relative; top: 0px;">$body</b> </div>{html} 3) Define the style for code in PDF. Maybe this can help someone.

              People

              • Votes:
                4 Vote for this issue
                Watchers:
                8 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:
                  Last commented:
                  4 years, 7 weeks, 2 days ago