Passing Base 64 code in iframe gives error
Question
Application Type
Reactive

Hi All.

I am displaying pdf by first converting it into Base 64 and then passing it in iframe using src=

"data:application/pdf;base64,"+FileData

It is sometimes not opening the file. Instead all the base 64 code gets viewed in the screen without iframe.


How to solve this issue?

mvp_badge
MVP

Hi Shubham,

I tried the same in a sample RW application and it is working as expected in my case.

See this sample app - IFramePDFView Demo

Refer the attached .oml file

Hope this helps you!


Kind regards,

Benjith Sam

RWALabIframePDF.oml

Hi Benjith

Yes it is working fine for all but one user. So can it might be a browser problem? Or some settings in browser?

Hi Shubham,

I hadn't tried this in a Reactive app yet, so I did a little test. This showed the PDF without any issue.
Can you maybe share an OML in which this issue occurs?

Regards,
Lennart

Hi Lennart,

It is working fine for all users except one. Can it be a browser problem or settings in the browser?

This can certainly be the case. I would suggest to let the user test it in another browser, to see if it's brower related. An issue like this can for example be caused by an ad blocker, so try to disable any add-ons to see if one of them cause the issue.

Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.