Export to PDF -dynamic content macro

Hi ,

How to include a dynamic content macro output in a pdf/word export .

my atlassian-connect json contains the renderModes
e.g.

 "renderModes": {
                    "pdf": {
                        "url": "/render-macro-static"
                    }
}

The connect endpoint returns a standalone HTML still the macro is not included in PDF export
html

<html>
<head>
  

</head>
<body class="aui-page-hybrid" >
  <section  role="main" >
	<div>Macro Static contents Loaded</div>
    
  </section>
</body>
</html>

Is there any additional information needs to be taken care of in the macro code?

Thanks in advance .

Html output will not work for renderModes. Your end point needs to return XHTML in the Confluence storage format.

Check these documentation

https://developer.atlassian.com/cloud/confluence/modules/macro-render-modes/
https://developer.atlassian.com/cloud/confluence/modules/static-content-macro/
https://confluence.atlassian.com/doc/confluence-storage-format-790796544.html

1 Like

Hi Rajeev,

Is there any way we can send macro input parameters as request parameters in pdf render url?

Thanks,
Ritu