Skip to main content

Notifications

Power Apps - Power Apps Pro Dev & ISV
Suggested answer

Unable to show DPF files in Powerapps PDF viewer from Azure blob storage.

(0) ShareShare
ReportReport
Posted on by 12
Hi All,
 
I am trying to display PDF files stored in Azure Blob Storage using the PDF Viewer control in PowerApps.
But I am getting a message like "Could not open PDF file, Make sure the PDF file is coming from an HTTPS Link".
 
Everything works fine when I stored the PDF files in SharePoint.
 
Appreciate any here.
 
Thanks in Advance.
  • CU26110618-0 Profile Picture
    CU26110618-0 12 on at
    Unable to show DPF files in Powerapps PDF viewer from Azure blob storage.
    @Garima_PowerPlatform, Thanks for your response.
     
    I have done CORS configuration and used the URL with SAS token. Also made the blob storage as public but still no hope.
    Its not working for me and giving an error as "Couldn't open PDF file, Open in my Browser instead"
     
    Do we need to make the url with something like this "appres://"
     
    I was able to display the pdf files stored in sharepoint but its not working with azure blob storage.
    Note : In sharepoint I am storing the link as Image datatype and could not find the same in azure blob storage.
     
    Please let me know if you need any additional information
  • Suggested answer
    Unable to show DPF files in Powerapps PDF viewer from Azure blob storage.
    If the Blob Storage is private, ensure that you have the correct authentication mechanism in place. You can use Shared Access Signatures (SAS) tokens or Azure Active Directory (AAD) authentication to securely access the blob storage.
    Ensure the SAS token or AAD token is appended correctly to the URL if needed.
     
    URL must be like this

    https://<your-storage-account-name>.blob.core.windows.net/<container-name>/<pdf-file-name>?<sas-token>

    Make sure proper permission

    If your Blob Storage is private, ensure the CORS (Cross-Origin Resource Sharing) settings are configured correctly on the Azure Blob Storage account. You need to allow your Power Apps domain to access resources in the Azure Blob Storage. This is important because cross-origin access is required for Power Apps to load files from external sources (like Azure Blob Storage).
     
    Once you have the correct HTTPS URL (with or without a SAS token), you can use it in the Document property of the PDF Viewer control like this:
    "https://<your-storage-account>.blob.core.windows.net/<container-name>/<file-name>.pdf"
    
    or if using a SAS token:
    
    
    "https://<your-storage-account>.blob.core.windows.net/<container-name>/<file-name>.pdf?<sas-token>"
    
    

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

End of Year Newsletter…

End of Year Community Newsletter…

Tuesday Tip #12 Start your Super User…

Welcome to a brand new series, Tuesday Tips…

Tuesday Tip #11 New Opportunities…

Welcome to a brand new series, Tuesday Tips…

Leaderboard

#1
WarrenBelz Profile Picture

WarrenBelz 144,609

#2
RandyHayes Profile Picture

RandyHayes 76,287

#3
Pstork1 Profile Picture

Pstork1 64,420

Leaderboard