Eric Brynsvold Eric Brynsvold - 2 months ago 20
Android Question

How can I open a PDF in an Android app and allow the users to use the embedded hyperlinks?

I am creating an Android app that will download and cache PDF files (the files are for issues of a magazine and the PDF file format is the client's requirement). These PDF files will have hyperlinks that link to other locations in the PDF as well as advertisers' websites, so it is important that the hyperlinks work. In researching this problem, there seem to be two ways to implement presenting a PDF to a user:

  1. Require the user to have a PDF viewing app, create an Intent and launch the PDF in the 3rd party app.

  2. Use a PDF rendering API to display the PDF natively in the app.

For the first method, I have yet to find a free PDF viewing app that implements hyperlinks. Adobe's Reader and others (vuDroid, android PDF viewer, droidreader, even Google Docs) only render the PDF but do not make the links clickable. There are apps that seem to have hyperlink support (ezPDF, repligo, QuickOffice and Documents to Go) that are not free, but my app can not depend on the user paying for another app to display the PDF. Are there any free PDF viewing apps that support hyperlinks that I've overlooked?

For the second method, I've seen recommendations for a few APIs, none of which are well-documented or have examples/tutorials that work out of the box to help developers understand how to use them. I've looked at muPDF, the itext port to Android, PDFbox and the android PDF viewer source code. Does anyone know of a good, simple example of one of these APIs (or one I didn't mention)?

Either one of these procedures would work fine, I've just gotten stuck going down both paths. I've read the PDF format is difficult to work with when building an app to render it natively, so I understand if there is nothing free out there that meets my needs. Thanks for the help!


Finally found a free PDF viewer that supports hyperlinks! Qoppa Viewer is a free PDF viewing app that supports hyperlinks. They also have an SDK (not free) that could be helpful in building this functionality into an app. Just wanted to update this for other people that find this question in the future.