Android PDF Viewer, Created Library

Dev Min
2 min readMar 1, 2020

--

This article is about the Android PDF Viewer Library
I recently made a library related to this and I want to have time to introduce it.

Introducing MindevPDFViewer

Let me give you a brief introduction about this.
I created PdfRenderer using this technology, and it has two main features.

  • This class is not thread safe
  • Added in API level 21

So I solved thread by using coroutine.

How?

I’m going to explain two things in more detail

  1. Coroutines Scope Related to IO Thread

I created the following class and this scope is being used by the class that does the IO Thread task.

  • PdfRenderer

This is where you download the actual pdf and open each page to render.
Page configuration consists of recyclerView

conclusion

The key process in creating this is the thread-related processing.
It was also something that taught me :)

--

--