2

I'm looking for an open-source library for android (Jar), in which I can open documents or pdf files. I have searched the net and haven't found anything suitable or stable.

My main goal is to show some encrypted files, which my application will decrypt and pass the file to the viewer; meaning that the whole procedure should be secured. I cannot pass the decrypted file to google-docs or any 3rd-party application, due to security issue.

Any help will be appreciated.

Thank you all for your time.

Alexei Robsky
  • 221
  • 5
  • 11

2 Answers2

3

I'd try Apache POI, the Java API for Microsoft documents. Its based on Java and I've seen it used in Android before.

I haven't used it myself though, so I can't accredit to how well it works.

Abel
  • 56,041
  • 24
  • 146
  • 247
Lucas Watson
  • 763
  • 1
  • 8
  • 26
  • I used POI and it worked well in android, however, POI is used for parsing a document, and it's not that simple to parse a .doc file. POI gives you a set of pictures, text, etc. and if you want to view them, you need to implement the rendering mechanism. Meaning, to position each picture and text. Think about a complex file :) – Alexei Robsky Mar 31 '12 at 11:16
  • Any examples Lucas? Which application do use it? I tried integrating it (poi-ooxml-schemas-3.10-FINAL-20140208.jar) but the method count exceeds Dalvik's method limit 65535. Can you think of any solutions for this? – Rajkiran Jun 20 '14 at 07:39
  • @AlexeiRobsky Did you found any solutions? How do you display the ms office files? – SKK Nov 24 '14 at 06:58
2

Check out the source code of APV - it's a PDF viewer based on MuPdf library - both are free. You can probably assemble something quickly.

hovanessyan
  • 30,580
  • 6
  • 55
  • 83