[英]Download PowerBI embed as PDF
我需要下載作為 PDF 文件嵌入的 powerBI。 我嘗試使用 Kendo UI 腳本來下載網頁(具體來說,div 中的任何內容都被轉換並下載為 PDF)。 我嘗試使用 jQuery 在 ASPX 網頁上訪問 PowerBi Embed 報告中的 div。 PowerBi Embedded 報告在 iframe 內呈現。 我總是將 Powerbi 報告 iframe 的內容文檔設為 NULL。 可能的原因是 CORS 限制。 有沒有辦法將報告下載為PDF?
是的! Power BI 在 2018 年 8 月的版本中添加了此功能。
select File > Export to PDF from Power BI Deskop.
注意
該功能會導出自定義視覺效果,但不會導出您可能已應用於報告的任何牆紙。
現在,2020 年 3 月發布的新 API 支持此功能
有兩個可用的 API 端點
1: 導出到文件
POST https://api.powerbi.com/v1.0/myorg/reports/{reportId}/ExportTo
2: 分組導出文件
POST https://api.powerbi.com/v1.0/myorg/groups/{groupId}/reports/{reportId}/ExportTo
注意:兩者都需要具有以下內容的請求正文:
| Name | Required | Type | Description |
|--------|----------|----------------|-----------------------|
| format | True | FileFormat | Export to file format |
| Name | Type |
|-------|--------|
| CSV | string |
| DOCX | string |
| IMAGE | string |
| HTML | string |
| PDF | string |
| PNG | string |
| PPTX | string |
| XLSX | string |
| XML | string |
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.