K
K
Kirill Yaroshevich2016-11-26 16:18:06
Android
Kirill Yaroshevich, 2016-11-26 16:18:06

Opening a PDF file in Android?

Hello! Please tell me how you can open a PDF file inside the application, and not use third-party programs. There are many examples on the Internet, but they are all the same and open pdf in third-party programs, and I need the pdf to open inside my application. Maybe someone knows or did?
advise the iText library. How to connect it?

Answer the question

In order to leave comments, you need to log in

3 answer(s)
A
Agrass, 2017-02-13
@kiruha_21

There is an old lifehack - through WebView, you may need along with a link to Google " https://docs.google.com/viewer?url={link_to_file.pdf} "() you can save the file to the device, print it, and some other standard feature set.

String doc="https://docs.google.com/viewer?url="+link;
webView.loadUrl(doc);

O
Oleg Gamega, 2016-11-26
@gadfi

mupdf is pretty smart

E
Ekalips, 2016-12-01
@Ekalips

For android versions >21 you can use PdfRenderer. An example of usage can be seen here

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question