Antoine ROBERT
Antoine ROBERT

Reputation: 392

Can't open PDF file from PWA on Android Device

This is just for the record, since I found the solution.

I experienced an Issue happening only on PWA Standalone App on Androïd device.

I used to open PDF file from my standalone VueJs application with this code :

window.open('<PDF FILE URL>')

or

window.open('<PDF FILE URL>', '_blank')

In that case, the PDF couldn't be read on Android Device. I had this message

Impossible d'afficher le PDF/d'ouvrir

I guess that in english error message would be something like :

Cannot display PDF/Open

Note that in the other side

My solution was to simply change my code with :

window.location = '<PDF FILE URL>'

Upvotes: 1

Views: 1983

Answers (1)

Antoine ROBERT
Antoine ROBERT

Reputation: 392

My solution was to simply change my code with :

window.location = '<PDF FILE URL>'

Upvotes: 1

Related Questions