Forum Discussion
Print and/or export to PDF from PowerBI Embedded Report
We are running into the same issue on our end. We have external users in the web application and we want to migrate them off of that into an embedded ISV solution, but we can't afford to lose the export to pdf option that the web service offers. Any ideas or thoughts about this issue would be greatly appreciated.
Firstly I just want to say that Microsoft seem to missing a trick - the paperless office is a myth and virtually all our customers want the ability to print (some A3/A2 size) Management reports. I managed to use the above project using NodeJS to facilitate printing by automating Chromium in a way similar to the link I posted earlier. As Microsoft are creating a browser based on this technology (see: Dev Edge) I don't think this deviates from most peoples concerns of browser compatibility issues - for example; CSS styling across browsers. So I'm guessing you could automate that if you needed to.
In essence what I did, was write this as a Serverless Function (AWS LAmbda in my case) using with entry point taking HTML (or DOM document) with the Power BI Token and config already embedded. It was just a case then using Puppeteer to create a page, inject the given document and export it as PDF (to a persistent file - though returning a file stream is equally valid). We did notice some issues with CSS - some fonts were too small and we had to manipulate some styles to get the printing 'just right'.
In testing we found this to be scaleable and performant. Scaleability was achieved by being serverless; horizontal scaling and not having to care about the number of Chromium instances being created. Performance was suprisingly quick - most functions took less than 5 seconds, that's including loading and running chromium and the overhead of API calls to api.powerbi.com to render the reports in web page.
The obvious thing here is that it requires development knowledge in order to create this. This is not something that can be done by a standard 'business team' - Microsoft should be able to offer this functionality relatively easily, but I guess it a case of priorities?
- husnainnourose3 years agoHelper I
hi,
Can we export any visual or complete embedded report using node js? i am looking to export single/multiple visuals from my embeded Power Bi report but i am not getting any help.
Have you acheived it somehow or any other idea you can share. As, for now the only option is taking screen shot using snip it or paint
kk0036 stuartb