I want to be able to read PDF in my App (e.g. in some LinearLayout) but I don't want to use anu external helpers, APIs. I have found PdfDocument and PdfRenderer objects, but they require such high API (21). Is any possibility to open a PDF file in my APP on low API level (10+) without external files?
And yes. I know it isn't so simple or short code, but for me it does no matter
I think this library link will help to solve your problem.you can also search pdf library in androidarsenal.com
https://github.com/jblough/Android-Pdf-Viewer-Library
http://www.mupdf.com/
If it does not matter and donĀ“t want any external lib or API, you better program it yourself.
Related
I am working on an application where I need to show PDF files from local storage. Currently I'm using this com.github.barteksc:android-pdf-viewer:2.8.2 library to read PDF files.
After build a release apk I got surprised that - my app size increased 22.6MB after using this library.
I have also searched in Android official docs for a better solution. I got PdfRenderer class. Unfortunately, this class added from API level 21. But my app minSDKVersion is 14.
How can I reduce apk size with pdf reader functionality? Or Is there any light-weight pdf library to read pdf files in Android?
Alternative for this SDK is opening the PDF in a webview - possible solution.
I have a doc/ppt/xls file located in my sd card. I want to open it without any third party app (i.e within my app itself) using webview. Though I am able to open documents by embedding it in google docs url like -
http://docs.google.com/gview?embedded=true&url=[filelinkHere]
But how to open a file located in internal or external storage in webview ?
Also, Suggest me any third party ALL-IN-ONE library for android to view all types of documents. I have tried ASPOS but it has few unresolved bugs and APACHE-POI is difficult to use.
I had the same issue few days ago .
i found Android PdfViewer best to view PDF files and Android PdfMyXml best to create pdf files in android.
For working with Word and Excel as a most reliable answer I suggest you to take a look at OliveDocLibrary .
If your documents are in cloud so there is an alternative way to display docx,pptx,pdf and such formats with a combination of Webview and googleDoc.
You might find other possible solutions in server-side machines or maybe a creative way!
Hope it help
You can integrate some library project to your project with which you can open the pdf file inside your app.
Reference :
https://github.com/tekinarslan/AndroidPdfViewer
https://github.com/JoanZapata/android-pdfview
I'm trying to draw my html formatted string into a pdf file for my android app, but the result is just the non formatted string with all the html tags visible.
Is there a way I can properly format the pdf file without using any external libraries? I can't use any for the app.
Or is there a way to convert an html file to a pdf file?
Is there a way I can properly format the pdf file without using any external libraries?
Not in any practical sense. If you have a large team or lots of time in which to write your app, you are welcome to write your own PDF generation code, as yms suggests in a comment.
Note that API Level 19+ has some HTML->PDF code in it, for the use in the printing framework, but it is not designed for generating arbitrary PDF files.
I can't use any for the app.
Then you cannot write any apps for Android, as every Android app involves libraries. The Android SDK is a library, for example.
I have no idea where to start, and can't find a decent, or at least understandable tutorial how to do it. Im still new to android (and coding in any matter) but i need to create and app that opens a pdf file (CV in my case) and reads phone number and email from it. Any ideas (tutorial links) how to do it? :)
You could use iText library: http://itextpdf.com/
In FAQ, there's a question: "Can I extract/parse information from pdf ?"
http://support.itextpdf.com/node/27
I have searched thoroughly but m unable to reach a solution on how to make pptx viewable in my app? Is there any library which i can add or any other solution because webview doesnt support this format?
I want to access my pptx file from my sdcard.
You can use Apache POI project
Apache POI Link
One way to do will be to fire an Intent with a specific Uri, and let the phone chose an application that can open that file, if any.