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

      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'

        Issue Links

          Activity

          Hide
          Matthias added a comment -

          This also affects version 4.0

          Show
          Matthias added a comment - This also affects version 4.0
          Hide
          Joseph Clark [Atlassian] 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
          Joseph Clark [Atlassian] 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 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 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:
                2 years, 5 weeks, 6 days ago