Reading PDF on Android

I need to make an application that needs to read PDF documents on an Android device. In fact, I do not want my application to depend on other applications to read a PDF file.

I reviewed the questions that are asked here and in some other places. They directly or indirectly use a third-party application.

Is there any API or something similar through which I can implement reading PDF files directly in my application? How to convert a PDF document to a PNG image? But the PDF-PNG method will not allow users to select texts.

Any suggestions?

thanks

+4
source share
2 answers

There is a library from Adobe that you can use. Its based on NDK, and you need to do the packaging yourself. Its also extremely expensive, basically nothing for a small firm / single developer, but for large companies. Afaik license is not only expensive, but also annual, so you need to pay for it every year ...

There are other libraries, mostly open source. Some of them have good performance, but lack of functionality (most of them are also based on NDK). I found only one clean java library, but the performance was more than worse (load time 10 seconds for a page, etc.).

There are three possibilities:

  • Using an external application, so you just need to implement your PDF library
  • You write everything yourself, including part of the PDF reader.
  • You create a middle β€œlevel” where you convert PDF to PNG or JPG (I prefer PNG for better quality). Significantly higher performance is associated with a lack of functions.

I am currently developing a complex application, as indicated in 3. but I cannot go into details, sorry.

+5
source

I definitely recommend Qoppa stuff on Android.

+1
source

Source: https://habr.com/ru/post/1341593/


All Articles