Android PDF Rendering

user895935 picture user895935 · Aug 17, 2011 · Viewed 8.2k times · Source

I would like to render/open PDF file (stored in SDCard) in Android without using in-build application or viewer.

1) We have tried MuPDF open source library but rendering using this library is very slow.

2) Can we use iText library for rendering PDF files in Android (i.e. iText as a PDF Viewer).

Is there any other PDF library(open source) that can be used in Android Or suggest basic guideline for developing PDF viewer for Android.

Answer

gluttony picture gluttony · Aug 17, 2011

1) MuPDF is good to render textbook pdf in android while it may be slow to render pdf with big images. A lot of customizations and improvements especially memory usage control need to do if you want the MuPDF to run fast and stable on android platform. You can check out two open source projects VuDroid and apv which are based on MuPDF.

2) It's up to your requirements. The iText may be enough to render simple text pdf, but I don't think it has better performance than MuPDF or other libraries that developed by using C/C++.

Another choice is to use Poppler. A successful story is the popular android app ezPDF Reader is based on Poppler, although it's violating GPL license. The out of box Poppler needs more work than MuPDF to do to run on android smoothly. You can refer to the open source project apdfviewer.