Cloud Page Export - PDF or Word
How to Export to PDF or Word
Step 1: Enable User Impersonation on your chart
Step 2: Publish the page then click "More actions" and select "Generate Custom Charts export images"
Step 3: Export the page to PDF or Word
The Problem
On Confluence Server, when PDF generation is started, a request is made to the server asking for the image to use
This is fine on Server because we generate the image when the chart finishes rendering and send it to the server, so it’s ready to go
But on Cloud, the image that is used must already be an attachment on the page, which represents a problem
Currently, each user who views a chart does so as their own user, which means the data displayed is based on their permissions on the connected Jira instance
Therefore, Custom Charts would either need to save multiple attachments (one for each user) or overwrite the attachments, which both result in
A mess (less important)
A security issue (very important)
The security issue is that there are no granular permissions regarding attachments, it’s either “View” or “No view” on all attachments on the page
This is unacceptable and needs a robust solution
The Solution
The two problems presented (a mess of attachments and a security issue) can both be solved by a common workaround - User Impersonation
When a Custom Chart has User Impersonation enabled, everyone who views the page sees exactly the same data loaded on the chart
This removes both problems, as now this Custom Chart can save a single image of itself as an attachment to the page, which can then be used for PDF and Word exports
The Custom Jira Charts for Confluence user must have Edit permissions on the page you are exporting.