From 6b39f7991bf1330fc75a7dd869bc46a7f8f10078 Mon Sep 17 00:00:00 2001 From: Matt Holgate Date: Mon, 23 Jun 2014 14:54:08 +0100 Subject: Fix for bug #695229 - open document from byte array doesn't work, but saving to file and open from file works Patch was supplied by gong_su@hotmail.com. Thanks! --- platform/android/jni/mupdf.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/platform/android/jni/mupdf.c b/platform/android/jni/mupdf.c index c7965702..01a8db9b 100644 --- a/platform/android/jni/mupdf.c +++ b/platform/android/jni/mupdf.c @@ -363,6 +363,7 @@ static int bufferStreamNext(fz_stream *stream, int max) stream->rp = bs->buffer; stream->wp = stream->rp + len; + stream->pos += len; if (len == 0) return EOF; return *stream->rp++; @@ -432,6 +433,7 @@ JNI_FN(MuPDFCore_openBuffer)(JNIEnv * env, jobject thiz) return 0; } + fz_register_document_handlers(ctx); fz_var(stream); glo->doc = NULL; -- cgit v1.2.3