The Android package of MuPDF is broken is several ways. The patch tries to fix this. - The Android package does not compile unless the directories in thirdparty are renamed (see changes to readme file). - There is no pregen package mentioned in the readme. - There is no file local.properties that is mentioned in the readme. - Several file names changed. - pdf_get_page_count was renamed to pdf_count_pages. - parameters of pdf_load_page have changed. - parameters of fz_new_pixmap_with_data have changed. - parameters of fz_execute_display_list have changed. - page numbering is now 0 based instead of 1 based.
Created attachment 7525 [details] Fix for this bug.
Fixed in: commit 5aaae3d936afc0aa4ff999b42b5a754c40885f75 Author: Robin Watts <Robin.Watts@artifex.com> Date: Tue May 31 14:16:28 2011 +0100 Fix android build; bug 692222. Bring the MuPDF android build up to date with the latest source changes. Many thanks to Dominic Battre for his helpful report in bug 692222. Many thanks!
The build still doesn't work for me. I am stucked at this: Gdbserver : [arm-linux-androideabi-4.4.3] libs/armeabi/gdbserver Gdbsetup : libs/armeabi/gdb.setup Gdbserver : [arm-linux-androideabi-4.4.3] libs/armeabi-v7a/gdbserver Gdbsetup : libs/armeabi-v7a/gdb.setup Compile thumb : mupdfcore <= dev_text.c C:/Users/Seal/Android/mupdf/android/jni/../../fitz/dev_text.c:6:22: error: ft2build.h: No such file or di rectory C:/Users/Seal/Android/mupdf/android/jni/../../fitz/dev_text.c:7:10: error: #include expects "FILENAME" or <FILENAME> C:/Users/Seal/Android/mupdf/android/jni/../../fitz/dev_text.c:8:10: error: #include expects "FILENAME" or <FILENAME> C:/Users/Seal/Android/mupdf/android/jni/../../fitz/dev_text.c: In function 'fz_text_extract_span': C:/Users/Seal/Android/mupdf/android/jni/../../fitz/dev_text.c:215: error: 'FT_Face' undeclared (first use in this function) C:/Users/Seal/Android/mupdf/android/jni/../../fitz/dev_text.c:215: error: (Each undeclared identifier is reported only once C:/Users/Seal/Android/mupdf/android/jni/../../fitz/dev_text.c:215: error: for each function it appears in .) C:/Users/Seal/Android/mupdf/android/jni/../../fitz/dev_text.c:215: error: expected ';' before 'face' C:/Users/Seal/Android/mupdf/android/jni/../../fitz/dev_text.c:237: error: 'face' undeclared (first use in this function) C:/Users/Seal/Android/mupdf/android/jni/../../fitz/dev_text.c:318: error: 'FT_Fixed' undeclared (first us e in this function) C:/Users/Seal/Android/mupdf/android/jni/../../fitz/dev_text.c:318: error: expected ';' before 'ftadv' C:/Users/Seal/Android/mupdf/android/jni/../../fitz/dev_text.c:319: error: 'FT_LOAD_NO_BITMAP' undeclared (first use in this function) C:/Users/Seal/Android/mupdf/android/jni/../../fitz/dev_text.c:319: error: 'FT_LOAD_NO_HINTING' undeclared (first use in this function) C:/Users/Seal/Android/mupdf/android/jni/../../fitz/dev_text.c:319: error: 'FT_LOAD_IGNORE_TRANSFORM' unde clared (first use in this function) C:/Users/Seal/Android/mupdf/android/jni/../../fitz/dev_text.c:324: error: 'ftadv' undeclared (first use i n this function) make: *** [/cygdrive/c/Users/Seal/Android/mupdf/android/obj/local/armeabi/objs-debug/mupdfcore/../../fitz /dev_text.o] Error 1
I have passed over upper said issue thanks to adding thirdparty and pregen folder. Now I am getting this: /home/seal/Android/mupdf/android/jni/../../pdf/pdf_cmap_table.c:5:35: error: ../generated/cmap_cns.h: No such file or directory /home/seal/Android/mupdf/android/jni/../../pdf/pdf_cmap_table.c:6:34: error: ../generated/cmap_gb.h: No such file or directory /home/seal/Android/mupdf/android/jni/../../pdf/pdf_cmap_table.c:7:37: error: ../generated/cmap_japan.h: No such file or directory /home/seal/Android/mupdf/android/jni/../../pdf/pdf_cmap_table.c:8:37: error: ../generated/cmap_korea.h: No such file or directory /home/seal/Android/mupdf/android/jni/../../pdf/pdf_cmap_table.c:14: error: 'cmap_78_EUC_H' undeclared here (not in a function) ...
The generated directory is produced by any standard linux or windows build. Apologies, the docs should be clearer on both thirdparty and generated, and I have just updated them to have sections on these. This should make its way through to the main git repo shortly. Thanks/Sorry.