Download button expansion

Hello there ,I'm using the embedding option for my dashboards and my client desires a download as pdf or image file option of the charts from the dashboards. I tried using html2canvas to screenshot the contents of my iframe but then i discovered its limitations due to security policies. Is there any detailed tutorial on how to edit the source code of a local metabase copy in regards of adding this functionality? Or any similar alternative.

Hi @SirVictor
Well, not using an iframe, but going directly to the URL should not be blocked by any CSP. Alternatively use a reverse-proxy to drop those CSP headers.
Otherwise you need to describe which "security policies" that is causing you problems.

Metabase does not have a browser rendering engine, so producing PDF/PNG is extremely difficult and not something that a single person can "edit the source code" to achieve.
You might learn more here:

Hello again and thank you for the quick response , currently the dashboards are residing in iframes each inside a html module on a DNN (DotNetNuke) web app for easier user role-based restrictions (whole backend is built for it) and we wanted to reduce data leak risks by removing the URL itself and only display it in the respective module. Referring to your solution, is it possible to extract what filters were applied on the respective dashboard in the iframe in order to send it to dashboard's URL and screenshot that entire page?

@SirVictor Yes, just check the iframe src attribute. That's not specific to Metabase, just regular old HTML.

Alright, thanks for the advice, will start working :slight_smile: