0
I have a problem using the html Object tag.
The documentation says it has support, but when trying to load the pdf on mobile, it does not load, only on the desktop. I tried with image to see the result and with normal image loads, both mobile and desktop.
I tried to use the embed tag instead, but I got the same effect. I also tried using url instead of Base64, but it still doesn’t work. In my case it needs to be Base64.
<object data="data:application/pdf;base64, xxx" type="application/pdf">
<p>
Arquivo não pode ser carregado. Faça o download
<a href="data:application/pdf;base64, xxx" download="Arquivo_TESTE">clicando aqui</a>
</p>
</object>
If anyone has an alternative solution to solve, I’ve found JS libraries that could help (but not tested), but I wanted to keep it simple.
Note: If you test on the desktop and then with the developer tool switch to mobile it remains loaded with content.
Dude that your date="" is spelled really weird, because it’s that way?
– hugocsl
is pq where is the xxx then put the Base64, put this way just to simplify. <Object data="data:application/pdf;Base64,YOURBASE64DATA" type="application/pdf"></Object> in this standard
– gustavo gomes
Did you solve it? I’m in real trouble
– Laísa Ferreira Cardoso
Unfortunately I could not solve, I ended up keeping so due to other emergencies, but after a lot of search and other moments I bumped into this Object giving me problems again, I ended up finding that it is problem with the engine to render in browsers and has not been solved yet. It’s like many have Chrome as a base, affects in several kkkk the best is Mozilla firefox, but I just didn’t test this problem in it to see.
– gustavo gomes