Skip to main content

Notifications

Power Apps - Building Power Apps
Answered

Download(filename.pdf) Opening another browser

(0) ShareShare
ReportReport
Posted on by 125

Hi Folks,

 

I need to download a PDF file from SharePoint Documents. Other files, .jpg, .xlsx. automatically downloading the file but PDF it opens another browser tab to view. 

 

Is there a way to download it directly?

  • cha_cha Profile Picture
    cha_cha 4,904 on at
    Re: Download(filename.pdf) Opening another browser

    Hello @philifova 

     

    The closest to your requirement is the Download function.

    Download("https://download_link.com/of_your_file.docx")

    https://learn.microsoft.com/en-us/power-platform/power-fx/reference/function-download

    But it only works if your users are using Mobile Power Apps and the Windows native  Power App player.

     

    Other than that you'll probably have to look at working on a more advanced component (PCFx) that could simulate a javascript that initiates a download.  Here is the forum for it.

    https://powerusers.microsoft.com/t5/Power-Apps-Pro-Dev-ISV/bd-p/pa_component_framework

     


      ✔️
    Just in case my response helped you solve your problem, please mark/accept this as a SOLUTION This helps community members if they experience a similar issue in the future.

     

      🔗
    🕸bistek.space  🐦 @cha_bistek  📺 @BisTekSpace 
  • Verified answer
    iAm_ManCat Profile Picture
    iAm_ManCat 18,151 on at
    Re: Download(filename.pdf) Opening another browser

    This is due to a setting on your machine which is set to open .pdf files from the browser as the default action. This experience would not be the same for everyone using your app as it will depend on what their Operating system settings are for default file associations.

    PDFs will by default try and open in Microsoft Edge, which is their associated program by default within Windows 8/10/11 - you will need to change this to something else if you wish to have the file to not open Edge. If you select the browser you are currently using it will open it within that going forward, but this change will only apply to your machine, everyone else will use whatever setting their PC has. I recommend using an actual PDF reader to make it browser-agnostic.

     

    iAm_ManCat_0-1670282346358.png

     

    iAm_ManCat_2-1670282631788.png

     

     

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Microsoft Kickstarter Events…

Register for Microsoft Kickstarter Events…

Announcing Our 2025 Season 1 Super Users!

A new season of Super Users has arrived, and we are so grateful for the daily…

Announcing Forum Attachment Improvements!

We're excited to announce that attachments for replies in forums and improved…

Leaderboard

#1
WarrenBelz Profile Picture

WarrenBelz 145,567

#2
RandyHayes Profile Picture

RandyHayes 76,287

#3
Pstork1 Profile Picture

Pstork1 64,907

Leaderboard