6

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?

vestland
  • 55,229
  • 37
  • 187
  • 305
Vishnu Chandel
  • 113
  • 2
  • 10

3 Answers3

1

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/

Mike Murphy
  • 1,287
  • 1
  • 12
  • 23
0

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

AGuyCalledGerald
  • 7,882
  • 17
  • 73
  • 120
vvvv4d
  • 3,881
  • 1
  • 14
  • 18
-1

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.

Pratik Bhavsar
  • 808
  • 8
  • 32