0

What is the best way to integrate a PDF document into my droid app?

I am attempting to recreate the same functionality we provide on our website in our mobile app.

I have 2 options of delivering the PDF to the device but the route I choose depends on the best way to implement this functionality on the device.

I could stream the document do the client and store a local temp file for viewing OR I could simply provide an HTTP URI for the document and present it on the device.

My main question is, what is the best way to integrate PDF viewing on the DROID? Can I check to see if they have Acrobat Viewer installed and make a call to the app, passing the URI data to it for loading?

codesurf
  • 31
  • 1
  • 7

2 Answers2

2

I am attempting to recreate the same functionality we provide on our website in our mobile app.

Not always a good idea.

Just my thoughts here, is there a reason that it must be PDFs delivered to the device? PDF is a very poor format choice for mobile devices. There is no native compatibility for the format, they are most often laid out for print document sizes, and they do not support text reflowing. Viewing PDFs on a mobile device is more of a chore than a helpful function.

Kevin Coppock
  • 133,643
  • 45
  • 263
  • 274
  • While I agree it is a chore and I for one hate dealing with PDF's, we work directly with a gov agency that provides thousands of them to us that we must make available to our customers/agents. The iPhone has good support for PDF viewing so I am just suprised that the Droid doesn't. – codesurf Dec 13 '10 at 15:09
  • 1
    Yeah, I can sympathize with you there (efficiency is not the strong point of government agencies...). I don't have any personal experience doing what you're asking for, but perhaps this link will help? http://stackoverflow.com/questions/3518407/android-starting-an-activity-for-a-different-third-party-app. You could try to start the Adobe Reader activity, and see whether or not you get an ActivityNotFoundException. If you don't, then it's installed. There are other PDF readers for Android though, so I'm not sure that would be the best method. – Kevin Coppock Dec 13 '10 at 16:01
0

If you are looking to embed the PDF as a view in your application, then you can try this vudroid.

I have been using this by including this project as a library and some minor tweaks to the library. They have provided a PDFView and a service which renders the view. Works for me; a bit slow though.

Hope that helps.

Prasad Korhale
  • 577
  • 1
  • 5
  • 15