I am developing an Android app and currently I am downloading a PDF file which I got from external web service. Now I want to display the PDF inside the application using PDF viewer without saving to the device memory.
Is it possible? If it isn't, then is it possible to save a PDF file to the device with password protected?
Related
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?
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.
I want to download pdf from my website into my app and that pdf only show in my app only , no other app can access it. What type of logic i need to implement in my Android Code ?
Download your pdf file into internal storage in android phone.According to the android developer site, by default, files saved to the internal storage are private to your application and other applications cannot access them (nor can the user).
Check https://developer.android.com/training/data-storage/files for reference.
I am trying to display a PDF in an Android application.
Constraints are: PDF cannot be downloaded to the mobile phone. Server through which PDF is getting downloaded is on Local network.
I can work on any option: getting the PDF to display on webview (more preferable) or getting the PDF to display using native technique.
Also if any solution involves converting the PDF to HTML and then displaying it will also be acceptable.
you can use third party library for this
https://github.com/voghDev/PdfViewPager
it works for me
I am new to android. I am creating a mobile app in android studio which contains a lot of PDF file views for the users using app. I decided to store those PDF files in a server. But i don't know to how retrieve the files on my the app.Is there any way to retrieve the PDF on our app from the local server..
Hoping for reply..
Just store the pdf files on your server using Multipart Post multipart request with Android SDK and then retrieve those files and store them in phone. Then you can use a filemanager https://github.com/nexes/Android-File-Manager to select and open the file.
For opening pdf you have to fire the intent which will open pdf file by using a preinstalled app or if you want to open by your app then there are several libraries like muPDF library, iText library(Java Library).
Ref: How to render PDF in Android
I have a bytestream with PDF contents and want to display the same in my android app. Is there a way I can do that without saving it as a physical file? For security reasons: I want the user to be able to just view the PDF and not store it in the phone memory or SDCard.
Does google doc viewer has the ability to take bytestream and render it? Or any other app that is installed in the android phone?
You cannot push "a bytestream" (presumably a byte[]) to another application. While there may be ways you can have another application pull the bytes to render it, any application will be able to do that, not just your PDF viewer, which will defeat your security goals.