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

Earn badges and make progress

You're on your way to the next level! Join the Kudos program to earn points and save your progress.

Deleted user Avatar
Deleted user

Level 1: Seed

25 / 150 points

Next: Root


1 badge earned


Participate in fun challenges

Challenges come and go, but your rewards stay with you. Do more to earn more!


Gift kudos to your peers

What goes around comes around! Share the love by gifting kudos to your peers.


Rise up in the ranks

Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!


Come for the products,
stay for the community

The Atlassian Community can help you and your team get more value out of Atlassian products and practices.

Atlassian Community about banner
Community Members
Community Events
Community Groups

How to get page information to appear in the header of the PDF Export

Jane Brusilovsky
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
Apr 26, 2023

I'm trying to figure out a way to pull the page title, just the first 5 characters of the page title, date (included as a macro on the page), and the status of the page and include it in the header during PDF Export. 

I have written the following HTML in the header section to get this:

<td style="color: #663399;"><b>Company Name</b></td>
<td><b>First 5 characters of Page Title</b></td>
<td><b>Date Macro from Page</b></td>
<td><b>Page Status</b></td>
<td colspan="4">Page Title</td>


I've just hard-coded the information, but I would like to have the pdf export inherit this information from the page, so that I do not need to modify the HTML every time I export a pdf.


Has anyone been able to do something similar?

1 answer

0 votes
Riley Venable (Atlas Bench)
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
Apr 26, 2023

One approach to dynamically generate a PDF header that includes the page title, date, and page status without hard-coding the information is to use a third-party add-on such as Scroll PDF Exporter or k15t's PDF Exporter.

These add-ons allow customization of the PDF export template and include dynamic content such as page titles, dates, and macros. Alternatively, you can use Confluence's built-in PDF export template feature, which allows you to create a custom PDF export template using HTML and CSS, which can include dynamic content using Confluence's template variables.

You can then upload this template to Confluence's template library and select it when exporting a page to PDF.

Jane Brusilovsky
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
Apr 27, 2023

Thank you! I'm using Confluence's built-in PDF export, but I didn't realize you could make a template with variables. I just did that for the variables I need, but how do you go about calling them in the Header HTML (or CSS stylesheet)? Is there a specific naming convention to pull those variables?

Like if my template variable was a text variable called page_stat, how would I incorporate it?

Suggest an answer

Log in or Sign up to answer
AUG Leaders

Atlassian Community Events