Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Adding dynamic content while PDF/HTML export from Confluence ?

Anil Gupta March 11, 2019

Is there any way to add dynamic content to exported pages in confluence(for all PDF/HTML/XML export) if someone want to implement for own plugin ?

I understand there are possibilities regarding formatting, which is kind of static not dynamic

1 answer

0 votes
Stephen Sifers
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
March 12, 2019

Hello Anil,

This is an interesting idea, having dynamic content within Confluence that follows the page via a PDF export.

The difficult aspects to this would be what type of Dynamic content you want to store within Confluence that you want available within a PDF export. The issue would be how would the content stay linked while exported and more so control of sensitive data.

To understand a bit more about what type of content you’re wanting, could you provide additional information or examples into what you’re looking for? Any examples of what others have done or screenshots would be helpful.

We look forward to your response along with any information you can share to help give you direction.

Regards,
Stephen Sifers

Anil Gupta March 13, 2019

Hi Stephen,

Thanks for responding!!

For scenario something like,

"Any web-item(in some section of confluence space/page) which displays some information and same can be available while export!!"

Is there any component which is be available(I looked available component but none seems useful or handy) to inject? 

If available then we can inject value/values and same can be retrieve dynamically in customized(Available in space tool) HTML/PDF layout ?

Regards,

Anil

Stephen Sifers
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
March 18, 2019

Hello Anil,

Thanks for the response along with additional clarification.

Without having an example to test this, I am not sure if the PDF export built into Confluence will export the content in the way you want (keeping the content connected and dynamic). With this said, there is further information on PDF exports at:

Along with this, it sounds like an alternative would be to explore marketplace add-ons which may bring in more PDF functionality that you’re looking for. We would suggest you review the Atlassian Marketplace to see what is available. Here is a preset search for the marketplace for Atlassian Marketplace | PDF export.

I hope this proves helpful and provides some additional options into what you want to do with PDF exports.

Regards,
Stephen Sifers

Anil Gupta March 19, 2019

Hi Stephen,

I have gone through all above links already but seems less help for adding dynamic content to confluence exporter.

But in very basic example can we call Macro in HTML/PDF header layout(customize) somehow ?

Macro i can create to include dynamic value!

Regards,

Anil Gupta

Stephen Sifers
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
March 19, 2019

Hello Anil,

Thanks for the follow-up.

With the default Confluence PDF exporter, any macro that includes content on the page will be exported as an image within the PDF and will not be dynamic. This is due to the macros using content within Confluence to render anything within themselves. The same would apply for an HTML export which would make any content that was within a Confluence page flat and no longer integrated with Confluence or other systems. In short, you can not call upon Confluence Macros within an HTML or PDF export and expect them to render results.

If you’re to create a macro which controls how a PDF is exported along with how the content within said PDF is managed, you may be able to turn some content into dynamic. As far as steps to accommodate this, you may want to consider asking in the developer community. You may find that community at Atlassian Developer Community.

I hope this clarifies why you can’t call a macro within a PDF export.

Regards,
Stephen Sifers

Like Anil Gupta likes this

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events