Home > Enterprise >  Open PDF in Android without it Automatically Being Downloaded To Device
Open PDF in Android without it Automatically Being Downloaded To Device

Time:08-02

I have a mobile responsive website where users enter login credentials to gain access to view pdf files inside my portal.

When viewing the website on my android phone, if a pdf is opened from inside the portal, my android phone automatically downloads a copy of the pdf on the android phone and then opens it.

This same process on a laptop or desktop simply opens the pdf in the default browser. There is a download button, but it is not automatically downloaded on the device.

From a programming standpoint, is there a way a programmer could prevent the PDF document from being automatically downloaded on the android phone and just have the document viewable in the browser?

CodePudding user response:

Depends on what you mean by downloaded. Whenever you view ANYTHING on the web, you have to download it. Downloading is the process of receiving data from a remote source. You have to download any webpage or url to view it.

It seems what you're asking is "Does it have to be saved to a file in the Downloads folder". In which case no, it doesn't. You could download it and keep it in RAM.

  • Related