Showing results for 
Search instead for 
Did you mean: 
Helper II
Helper II

Download in PDF

Hi All


Microsoft has released the option to download report in PDF in PowerBI Embedded. However, they has provided only C# code. ANd, for my project, I have required the Java Script code. Can anyone suggest me, how I can get the JS code. Or I can translate C# code into Java Script.


Solution Sage
Solution Sage

Hi @Ashu2021 ,


Basically you have to use the exporttofileingroup REST API


The C# Code/Dotnet SDK is just a abstraction layer which internally uses the same export api. So you can use the raw api in your javascirpt rather than a C# code/any sdk



Thanks for your reponse. It's great help for me. It will good, if you can share some example file for the same


Kind Regards


Hi @Ashu2021 ,


I'm not much into javascript, however I can give you some links handy


With the above link you just need to replace the exisiting API with the export API.

Helpful resources

PBI User Groups

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group!

MBAS on Demand

Microsoft Business Applications Summit sessions

On-demand access to all the great content presented by the product teams and community members! #MSBizAppsSummit #CommunityRocks

MBAS Attendee Badge

Claim Your Badge & Digital Swag!

Check out how to claim yours today!


Are You Ready?

Test your skills now with the Cloud Skills Challenge.

Top Solution Authors