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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
Anonymous
Not applicable

PDF Viewer Help - PDF to Base64

Hello Community,

I am trying to use the PDF Viewer visual from the AppSource. It mentions that the PDF must be converted to Base64. I am trying to execute this in PowerQuery as a custom column using the below code.

 

Binary.ToText([Content],BinaryEncoding.Base64)

 

Where the "Content" column contains the Binary data for the PDF. It looks like the Base64 string is created, but the visual still does not work. 
binary.JPG
Anyone with experinence with this app that could help?
Do I need to have a seperate file that is the Base64 dataset?
 
Thanks!
 
 
6 REPLIES 6
cyrusemami
Frequent Visitor

met722
Frequent Visitor

@Anonymous so you were able to get that Power Query function to convert on the fly to base64? 

 

I want to find a way to do this where it doesn't require manual work each time new PDFs are added to folder. 

Anonymous
Not applicable

@met722 

We have went with a different strategy that offered a bit more flexibility to searching the PDF pages. We created a .jpg image for each page and used that in our BI with the "Image" app from the AppSource.

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
sanimesa
Post Prodigy
Post Prodigy

@Anonymous  I tried this visual and it worked as expected when I used python outside of Power BI to get the encoded string. Please check their documentation and examples.

I'd assume something breaking when the binary import is being done, can you please describe your process?

Anonymous
Not applicable

@sanimesa 

Thanks for the response!

I have a pdf file on my desktop, I am point to that in power query, then creating a custom column where I use the code mentioned in the original post to create the Base64 string.

The string looks that same as when using other tools to create, but I can't get the visual to work. How would I integrate your Python method into what I'm doing?

I have very limited Python experience.

 
 
 

@Anonymous  Ok, your approach worked for me, so I suspect it may be due to limitation of the 30,000 characters. So, please follow their example and split up the text field further into multiple fields and see if it works.

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.