[poppler] Poppler in android via JNI

Albert Astals Cid aacid at kde.org
Fri Nov 13 10:46:58 PST 2009


A Divendres, 13 de novembre de 2009, Arthur Peters va escriure:
> Response interlaced.
> -Arthur
> 
> On Fri, Nov 13, 2009 at 1:15 PM, Albert Astals Cid <aacid at kde.org> wrote:
> > A Divendres, 13 de novembre de 2009, Arthur Peters va escriure:
> > > So I want to use my android phone as an ebook reader and all the PDF
> > >  viewers for the platform seem to suck badly. So I want to port poppler
> >
> > and
> >
> > >  write a simple front end for it.
> > >
> > > I have seen that this has been thought about ("Java/JNI-based frontend
> >
> > for
> >
> > > Android" in TODO) however I see no technical discussion. I want to
> > > start such a discussion so that I can get some guidance from people who
> > > know poppler better. The questions I can think of now are:
> > >
> > > * Should I just render the PDF down to a bitmap in C and then pass that
> >
> > to
> >
> > > Java and draw it to the screen (basically just modify the
> >
> > ImageOutputDev)?
> >
> > > Or should I try to use the android native drawing functions to draw the
> > > lines and glyphs and stuff? (or even use GLES from C)
> >
> > Doing a Java/AndroidOutputDev is probably better but much more difficult
> > than
> > just using the output of SplashOutputDev or CairoOutputDev (provided you
> > have
> > the dependencies for those in Android)
> 
> OK. I could in theory build Cairo for Android, but I'd rather not. It
>  looked to me like ImageOutputDev from the utils directory could create
>  bitmaps without many dependencies. Am I missing something?

Yes, ImageOutputDev obtains "images" inside the PDF, not a image of the PDF, 
for that you either need SplashOutputDev or CairoOutputDev. SplashOutputDev 
needs freetype and fontconfig, CairoOutputDev adds Cairo on top of that.

Albert


More information about the poppler mailing list