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

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

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
LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

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

April Fabric Community Update

Fabric Community Update - April 2024

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