View PDF files via PDFBox-android - android

I need to view PDF files (just view, nothing more) on my Android application, and i've been asked to use pdfbox for android.
What is the simplest way to view PDF files via this library? i don't seem to find an example for doing that

Related

Display pdf file within app

I have pdf file download in my device on known location. I want to display it within my application. I tried several pdf viewer libraries like:
https://github.com/JoanZapata/android-pdfview <--- This is deprecated.
https://github.com/jblough/Android-Pdf-Viewer-Library <--- Does not display pdf properly. I mean it has several issues while loading pdf.
https://github.com/barteksc/AndroidPdfViewer <--- So far best I could find over the internet.
But none of the above work on hyperlinks to navigate to certain header within the file.
I know i can display pdf file in Google drive viewer, but I don't want that.
So anyone can suggest me relevant pdf viewer library in android which I can plug in my project?
Use google doc viewer to view pdf without any external library.
String pdf = "http://www.pdf995.com/samples/pdf.pdf";
webview.loadUrl("http://drive.google.com/viewerng/viewer?embedded=true&url=" + pdf);

How to open documents located in Local Storage in android using WebView?

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

Android view multi page .tiff file

I am using this tiffonandroid library to view .tiff images in my Android application and its working fine.
The problem however is that some of the .tiff files I receive from server are multi page .tiff files and the above library provides a means to view only one page (the front page) although that .tiff file has other pages.
How can I display multi page .tiff files using the above library?
I create library that allows read multipage tiffs https://github.com/Beyka/Android-TiffBitmapFactory

Docx/Pdf/etc and WebView

How I can laod doc/docx/pdf and xls files into WebView?
I tried to use loadData(myBase64, "mime type for example application/pdf", "base64), I tried to use loadUrl("file///...") - no effect.
Or how I can view this files in my application? (without external programs)
...And I CAN'T to use web readers.
How I can laod doc/docx/pdf and xls files into WebView?
You don't. WebView does not have the ability to display these file types. WebView handles HTML, CSS, JS, some image formats, and the like.
Or how I can view this files in my application? (without external programs)
You spend a lot of money on libraries to do this.

How to load a .pdf or a .doc file in android

I want to show a pdf (preferably) or a word document in my app; like a privacy notice screen. Many applications have it, so it should be possible. i tried loading a simple text file as a start but doesn't provide formatting, fonts or trade mark symbols. I've gone through a few posts but I couldn't apply it to my app. Could anyone tell me how is it done? Could I store the file somewhere in res folder and provide a path to open it through my code? I looked into the following link but I'm not sure if that's the right approach in my case android: open a pdf from my app using the built in pdf viewer.
Android does not support opening PDF and DOC files natively. You'd have to make your own implementation.
Like t0mm13b said, you should consider using HTML (+ CSS) instead and use a WebView.

Categories

Resources