I have embedded a power bi online report into my MVC C# application and its rendering properly. Further I am trying to export it into PDF, but didn't find a way to do it. I have tried jsPDF and Cavas2html, but that didn't work. Is there any possibility to do it using any other tools?
Microsoft just released the functionality we're looking for! Apparrently we can call a power bi report and export it as a PDF programmatically. https://powerbi.microsoft.com/en-us/blog/export-report-to-pdf-pptx-and-png-files-using-power-bi-rest-api/
You cannot achieve this without a hacky solution as of July 2019. Printing and exporting as pdf/ptt etc. from Power BI embedding is currently rather limited.
There is a feature request for exporting as pdf here with over 400 votes. If this is a feature you want I suggest voting for it: https://ideas.powerbi.com/forums/265200-power-bi-ideas/suggestions/35066698-export-to-pdf-via-power-bi-embedded-api#comments
I know its pretty late now, but can just try printing it:
// Get a reference to the embedded report HTML element
var embedContainer = $('#embedContainer')[0];
// Get a reference to the embedded report.
report = powerbi.get(embedContainer);
// Trigger the print dialog for your browser.
report.print()
.catch(function (errors) {
Log.log(errors);
});
Let me know if it helps.
© 2022 - 2024 — McMap. All rights reserved.