Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Get certified in Microsoft Fabric—for free! For a limited time, the Microsoft Fabric Community team will be offering free DP-600 exam vouchers. Prepare now

Reply
gluizqueiroz
Resolver I
Resolver I

How to display/show a PDF in a visual inside Power BI?

I have searched for many days and I didn't find solution that works for me, my customer have a specific request about this and I didn't ind a way to achieve, here my question:

I have a lot of PDF files uploaded in cloud (near 20k files) and I access the files using a simple URL, like the following: https://www.africau.edu/images/default/sample.pdf (If you open this link, you will see a PDF example).

What I need to do is using a visual in Power BI, display the PDF inside (like embedded) the project.

 

For clarifing, I have the following page, a table containing files name and URL and a HTML Content (visual) showing the iframe of PDFs.

gluizqueiroz_0-1666116384820.png

 

But my problem is, it doesn't work, even in Power BI Desktop or published in Power BI Web, the visual HTML Content cannot display the PDF file.

Im using an iframe to display PDF, and it works nice in a simple page HTML, but if put the same code in HTML Content (visual), it doesn't work, or it stay black with a message:

This page has been blocked by Opera

ERR_BLOCKED_BY_CLIENT
 
In Power BI Desktop, I'm using the following configs:
gluizqueiroz_1-1666116812663.png

 

Mesure HTML (just for test):

 

HTML = 
"<iframe src='https://www.africau.edu/images/default/sample.pdf' style='position: fixed; width: 100%; height: 100%;'></iframe>"

 

 

A printscreen for my embedded example:

gluizqueiroz_2-1666117305839.png

The same iframe html code that I used in measure, I'm using outside embedded and as you can see, its works properly.
My desire is display/show the PDF file like outside embedded, but inside Power BI, because I need to filter diferent files and some extra features.

I already tried to use base64 encode to display and it works like I need, but I have some big PDF files and when I encode it to base64, it generates more than 2.1 milion chars and CONCATENATE in Power BI have the limit of 2.1 milion chars.

6 REPLIES 6
ICH_BO_SPAIN
Regular Visitor

I tried and couldn't do it.

The only way is to convert the PDF into a picture (.png) and use the "Simple image" visualization: that works (the image quality will be usually quite poor though).   

Meliqu
New Member

Hi! By any chance, did you found a solution for this?

Hello! Unfortunately not. I tried many solutions, but none is a good solution. So, I create a external "website" to display the PDF file and put a direct link in Power BI, when user click on link, a new tab is open showing the PDF.

That's really sad. But great workaround. Thank you!

 
v-easonf-msft
Community Support
Community Support

Hi, @gluizqueiroz 

Currently, it's difficult to render the content of a PDF inside a Power BI report.

But you can use PDF connector to import data from PDF files, for more details, please take a look at the following article.

PDF connector now generally available
Connect to PDF files in Power BI Desktop

 

Best Regards,
Community Support Team _ Eason

So, there is no way to display a PDF file inside Power BI when the file is in the cloud and access it online?

Helpful resources

Announcements
OCT PBI Update Carousel

Power BI Monthly Update - October 2024

Check out the October 2024 Power BI update to learn about new features.

September Hackathon Carousel

Microsoft Fabric & AI Learning Hackathon

Learn from experts, get hands-on experience, and win awesome prizes.

October NL Carousel

Fabric Community Update - October 2024

Find out what's new and trending in the Fabric Community.