[poppler] Poppler in android via JNI
Arthur Peters
amp at singingwizard.org
Fri Nov 13 08:32:46 PST 2009
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)
* Does rendering start from scratch every call to displayPageSlice (or
similar) or is some data cached? I'm wondering because I was thinking about
only rendering what was needed for the screen at any given time and then
rendering new parts as needed for zooming and paning.
* What sort of API design should be used? Should it be something as simple
as:
class PDFRenderer {
public PDFRenderer(File file);
/// The returned byte[] contains RGB(A?) values for each pixel.
public byte[] renderSection(byte[] image, int page, double hDPI, double
vDPI, int rotate, int sliceX, int sliceY, int sliceW, int sliceH);
public void close();
}
* Has anyone started work on this already?
* Are you interested in patches adding this feature to the main repository?
Thanks a lot.
-Arthur
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.freedesktop.org/archives/poppler/attachments/20091113/880c0633/attachment.html
More information about the poppler
mailing list