Android PDF Rendering
Asked Answered
S

3

7

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.

Serene answered 17/8, 2011 at 2:49 Comment(0)
G
4

I've done some research in this field recently, I've tried more than 14 libraries on Android, I've done simple benchmarking on some high resolution print-ready PDF magazines and I'm currently considering to use MuPDF or Radaee in work as they went out as the best.

I've tried VuDroid and apv as well and they are very unstable, they are crashing very often on complex PDF documents and very slow in comparsion to MuPDF or Radaee.

Since MuPDF and Radaee (and some other libraries) are written in pure C and are used on Android through NDK, they are giving the best possible performance (and they both are paid for a commercial use).

Gasholder answered 29/11, 2013 at 11:25 Comment(2)
it seems all MuPDF( derived VuDroid, apv),Radaee are no suitable to use in paid app. Is that any pdf library that can be used in paid app?Nozicka
I'm not sure what exactly are you asking, but if your question is what library is free to use for commercial intent, you could look for PDFBox library. Although it is Java library, there may be some port for Android somewhere (e.g. seems like there is starting some project on GitHub: github.com/jeremyvillalobos/android-pdfbox-port)... there also exists another java PDF library called PDFView from Sun that is completely free.Raseda
C
8

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.

Cetacean answered 17/8, 2011 at 4:0 Comment(3)
Gluttony Thanks for prompt reply - will try suggested options and let you know... At the same time i am exploring few things and found one more option i.e. PDFBox - can we use that in Android as a PDF viewer...Serene
Why do you think ezPDF is based on Poppler?Zayin
Pressreader by Newspaper Direct are also using Poppler, works quite nicely too although panning is a little laggy.Rebbecarebbecca
G
4

I've done some research in this field recently, I've tried more than 14 libraries on Android, I've done simple benchmarking on some high resolution print-ready PDF magazines and I'm currently considering to use MuPDF or Radaee in work as they went out as the best.

I've tried VuDroid and apv as well and they are very unstable, they are crashing very often on complex PDF documents and very slow in comparsion to MuPDF or Radaee.

Since MuPDF and Radaee (and some other libraries) are written in pure C and are used on Android through NDK, they are giving the best possible performance (and they both are paid for a commercial use).

Gasholder answered 29/11, 2013 at 11:25 Comment(2)
it seems all MuPDF( derived VuDroid, apv),Radaee are no suitable to use in paid app. Is that any pdf library that can be used in paid app?Nozicka
I'm not sure what exactly are you asking, but if your question is what library is free to use for commercial intent, you could look for PDFBox library. Although it is Java library, there may be some port for Android somewhere (e.g. seems like there is starting some project on GitHub: github.com/jeremyvillalobos/android-pdfbox-port)... there also exists another java PDF library called PDFView from Sun that is completely free.Raseda
P
0

Take a look at my PDF reader for Android here at anddev. As I remember it uses modified PDFBox (without things related to editing), and features my own font converter (to feed fonts to Android and render them faster).

I don't develop PDF reader anymore and I can make all my changes opensource (though it will require some work, and time). You can try it out to find out how well it performs for you. Note: reader doesn't support encryption and copy-protection.

Perse answered 18/8, 2011 at 3:21 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.