Printing the page of a workshop or exporting the workshop page into pdf

Hello Community,

I have a use case to export the page of a workshop into a pdf clicking on a button.

I have tried with slate, notepad document and everything I could think of.

I also tried creating a custom widget which is a button which calls the window.print() method, but still it didn’t worked. It is asking for some allow-model is not there in the parent iframe. So it cannot be called.

The workshop page included object tables, metric cards, embedded notepads, etc.

Even if I want to use it with a slate, by the time the print dialog is opened, the notepads and the parameters that are passed to the slate are still loading. I am using the slate.print event in the slate.

and I don’t want to embed the whole page of the slate into the workshop, I only need download button in the workshop.

Please help me out here, thanks