Generate a PDF from container elements in the App

Hi, we have an analytics page in the app where the requirement is that we are able to export all the graphs to a PDF report. The “print page” functionality is not sufficient, so We were playing around with the idea of assigning each element and Element ID, and convert from canvas to html, before using this to generate the PDF document, however we are facing some difficulties.

Does anyone have any suggestions on how to solve this?


It sounds like this article could be of help? The guide also has a link to the setup in Showroom!

Thanks, that is a great guide! We used it and it worked wonders for elements in a single container, but we had some issues with including elements from multiple elements into one PDF. We tried both printing all and appending the elements to one another, but they always got smudged on top of each others.

Do you have any tips for this situation? :slight_smile:


Sorry, I do not have a general solution to that :wink: But for the example to work, I believe you need all elements to be within a single container, so that the UI for everything is generated and visible (in the viewport, or as part of the vertical scroll of the visible view). That the example does, it to extract the HTML from the visible view from “the given container/div and below in the hierarchy”, and generate a PDF just for that HTML.