This question already has answers here:
How to render a PDF file in Android
(11 answers)
Closed 7 years ago.
I am going to read a pdf file from my sdcard and load it into my android application without starting any pdf reader installed on my android device!
is it possible?
how?
thanks!
Or if you have access to internet, just upload it to Google Drive and view it online.
Just you need a Browser in this case.
The content of the .pdf can be read with read with the iText library for Android http://itextpdf.com/product/itextg But If you want see the content you need a pdf viewer app or integrate one in your app
Related
This question already has answers here:
Why can't chrome read local html file on android?
(1 answer)
How can I open and view html files stored locally on my Android device in a web browser running outside of my app, preferably using Intent ACTION_VIEW
(1 answer)
How to open HTML files on a SDCard on an Android
(4 answers)
Android - can not access the html file on sdCard [closed]
(7 answers)
Open a downloaded html file with WebView
(1 answer)
Closed 11 months ago.
There are some topics about this question but they are old and I can't believe there isn't a solution for this.
I have made an HTML file and placed it in the Download directory from Android.
When I try to open the file in Chrome, Firefox or Opera I get an error: file:///storage/emulated/0/Download/mysite.html
We are living in 2021 and I can't believe this isn't possible.
Maybe Tasker can help?
3 Options that can work, depending of the content of your file:
You can use a local web server in your Android phone itself. There are many server apps out there in the Play Store, one such app is Simple HTTP Server.
You can put your documents into the folder Android/data/com.android.chrome/files/Download/ in the internal storage. It's absolute path is /storage/emulated/0/Android/data/com.android.chrome/files/Download/ or /sdcard/Android/data/com.android.chrome/files/Download/. This is the location where Chrome stores any downloaded files and therefore, this is the only location where Chrome can access the files. But remember, uninstalling Chrome will delete this directory.
Also you can download a HTML Viewer to open your file.
This question already has an answer here:
Best way to include pdfs in an app
(1 answer)
Closed 9 years ago.
I am going to write an android app, which will contain a PDF file (included with in the application). My task is, when i click a button , pdf file should open . PDf file is placed in assets/raw (not sure where to place ).
Can any one help on this...
Thanks in advance
You can open pdf via webview and google docs.
You should use
WebView.loadUrl("http://docs.google.com/gview?embedded=true&url=www.site.com/file.pdf");
I would use a PDF Renderer to convert the file to a Bitmap. Otherwise, you would have to use another application to open the file, or the option that Walter gave you. Here is an example using a different library for rendering a PDF using Java.
This question already has answers here:
How to render PDF in Android
(6 answers)
Closed 9 years ago.
i am very new to android development..........i have searched the stack overflow archives but nothing seem to work for me....
i just need an application to read PDFs files in android on button click....
-just PDFs read (no writing or converting or anything)
please if someone can guide me in the right direction and which library to get.......
used itext but its not working.......application crashing on
Document document = new Document();
any help would be appreciated.....thank you
you can read pdf files using WebView like
mWebView.loadUrl("https://docs.google.com/gview?embedded=true&url="+ webUrl);
You must use an implicit intent, put the PDF file path in an URL and launch it with the intent with ACTION_VIEW, it will launch with the default PDF application.
This question already has answers here:
Closed 10 years ago.
Possible Duplicate:
How to read pdf in my android application?
My application will have a link for a pdf file. When user click on a link, pdf file should download to local storage if it is not already present and my application should open that pdf file in a pop-up window and that popup will have close button at top right corner of window. I don't want default/third party pdf reader to display my pdf file.
How I can implement this requirement in my application?
No.Without third party you cant use it. If you force to use it, then images or some unicode
text type wont visible.So you want to go for OCR tool or use set of libraries and sdk for pdf.
Libraries and sdk.
This might help you
http://www.qoppa.com/android/pdfsdk/
http://code.google.com/p/droidreader/
This question already has an answer here:
Closed 11 years ago.
Possible Duplicate:
how to read / write doc and excel file in android?
I just need to read/view all microsoft office files such as word,powerpoint,excel documents in android.I've installed office document viewer in my device.I need any sample code to view those files.
Follow this link i think this is what you need How to render PDF in Android its for pdf i think you can do same for office docs
you can send via intent if app is already installed or display in webview with google docs links