Android webview won't load PDF files

Hi,

My app is built using UI Builder, and then wrapped into the Backendless Native Mobile App Shell.

I am using the “Open Web Page” block to open a URL. This URL can be HTML, PDF or an image. When the URL is a PDF document, it doesn’t load on Android. On iOS and while testing on my Mac, it does load all right.

The Flutter lot spits out the following type of error :
W/chromium( 6862): [WARNING:spdy_session.cc(3526)] Received HEADERS for invalid stream 13

Thanks for your help.

Hello @Nicolas_REMY,

We are sorry for the inconvenience. An internal ticket was created on this issue - BKNDLSS-31609. Our developer will look into the issue as soon as possible.

Regards
Nazar

1 Like

Hello, @Nicolas_REMY.

Does this problem still exists?

Regards, Nikita.

Absolutely. I haven’t tested recently whether the error message is the same or not.
But as of today, when I have a link to a PDF file in Android, I don’t have a satisfactory solution to display then PDF from the app like it happens on iOS.

I tried opening it in the external browser. If there is an app which can handle PDFs, then it might work fine, but if the user doesn’t have an appropriate app, then the file is downloaded somewhere and instead of viewing the PDF, then the user is left wondering what happened.

I also tried the Backendless plugin, but because of CORS limitations, it works only if the PDF is stored within Backendless storage - and we all know that Backendless is now discouraging using the provided storage.

So the only option I found to this day is using the Google document preview, which works with PDF and other file types. Of course, from a privacy point of view, this is not ideal…

Ok, thank you. In near future I will start to investigate this problem.

Regards, Nikita.

1 Like

Hello, @Nicolas_REMY.

I updated repo with PDF fix. Can you clarify if everything fine now.

Regards, Nikita.