<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Exporting PDF/PPT with current state via API in Developer</title>
    <link>https://community.fabric.microsoft.com/t5/Developer/Exporting-PDF-PPT-with-current-state-via-API/m-p/3327639#M43436</link>
    <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;Following instructions from other posts, I am attempting to export an embedded report into a PDF or PPT file with the current state of the report via the following:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;1. When the user chooses to export their report, I get the current state via the Javascript API:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;var capturedBookmark = await this.report.bookmarksManager.capture();&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;2. I verify that I get a state value string, and then when exporting via the powerbi api where state is that state string captured in step 1:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="csharp"&gt;var export = await client.Reports.ExportToFileInGroupAsync(new Guid(workspaceId), new Guid(reportId), new ExportReportRequest()
                {
                    Format = fileFormat,
                    PowerBIReportConfiguration = new PowerBIReportExportConfiguration()
                    {
                        Identities = new List&amp;lt;EffectiveIdentity&amp;gt;() { effectiveIdentity },
                        DefaultBookmark = new PageBookmark(state: state)
                    },
                });&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This however always returns an invalid request error of "Export report was provided with an invalid bookmark".&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Is there something I might be missing here?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Wed, 12 Jul 2023 14:45:55 GMT</pubDate>
    <dc:creator>ozpbi123</dc:creator>
    <dc:date>2023-07-12T14:45:55Z</dc:date>
    <item>
      <title>Exporting PDF/PPT with current state via API</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/Exporting-PDF-PPT-with-current-state-via-API/m-p/3327639#M43436</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;Following instructions from other posts, I am attempting to export an embedded report into a PDF or PPT file with the current state of the report via the following:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;1. When the user chooses to export their report, I get the current state via the Javascript API:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;var capturedBookmark = await this.report.bookmarksManager.capture();&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;2. I verify that I get a state value string, and then when exporting via the powerbi api where state is that state string captured in step 1:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="csharp"&gt;var export = await client.Reports.ExportToFileInGroupAsync(new Guid(workspaceId), new Guid(reportId), new ExportReportRequest()
                {
                    Format = fileFormat,
                    PowerBIReportConfiguration = new PowerBIReportExportConfiguration()
                    {
                        Identities = new List&amp;lt;EffectiveIdentity&amp;gt;() { effectiveIdentity },
                        DefaultBookmark = new PageBookmark(state: state)
                    },
                });&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This however always returns an invalid request error of "Export report was provided with an invalid bookmark".&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Is there something I might be missing here?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 12 Jul 2023 14:45:55 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/Exporting-PDF-PPT-with-current-state-via-API/m-p/3327639#M43436</guid>
      <dc:creator>ozpbi123</dc:creator>
      <dc:date>2023-07-12T14:45:55Z</dc:date>
    </item>
    <item>
      <title>Re: Exporting PDF/PPT with current state via API</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/Exporting-PDF-PPT-with-current-state-via-API/m-p/3327695#M43437</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I don't see what is missing, the bookmark state should be some base64 which Power BI tries to decodes. The error probably means something was wrong during decoding. Maybe try to see in the network traces how the state you're sending looks like. If it's not a base64 string then it wasn't captured/passed correctly.&lt;/P&gt;&lt;P&gt;You can also try to apply the bookmark state using the Javascript API and see if it's valid.&lt;/P&gt;</description>
      <pubDate>Wed, 12 Jul 2023 15:04:18 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/Exporting-PDF-PPT-with-current-state-via-API/m-p/3327695#M43437</guid>
      <dc:creator>AmosHersch</dc:creator>
      <dc:date>2023-07-12T15:04:18Z</dc:date>
    </item>
    <item>
      <title>Re: Exporting PDF/PPT with current state via API</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/Exporting-PDF-PPT-with-current-state-via-API/m-p/3372440#M43812</link>
      <description>&lt;P&gt;The issue was an outdated powerbi-client package. Upgrading resolved the issue.&lt;/P&gt;</description>
      <pubDate>Wed, 09 Aug 2023 14:26:02 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/Exporting-PDF-PPT-with-current-state-via-API/m-p/3372440#M43812</guid>
      <dc:creator>ozpbi123</dc:creator>
      <dc:date>2023-08-09T14:26:02Z</dc:date>
    </item>
    <item>
      <title>Re: Exporting PDF/PPT with current state via API</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/Exporting-PDF-PPT-with-current-state-via-API/m-p/3860661#M51922</link>
      <description>&lt;P&gt;Hi, Do you have the steps to enable export to pdf/ ptt for powerbi reports embedded in web application for external users&lt;/P&gt;</description>
      <pubDate>Tue, 23 Apr 2024 01:32:25 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/Exporting-PDF-PPT-with-current-state-via-API/m-p/3860661#M51922</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2024-04-23T01:32:25Z</dc:date>
    </item>
  </channel>
</rss>

