summaryrefslogtreecommitdiff
path: root/platform/android
AgeCommit message (Collapse)Author
2016-09-23JNI: Rework conversion functions and nulls.Robin Watts
Java has a convention that 'toString' should return a printable version of an object. We cannot both support this, and support a sane naming of functions to interpret pdf objects that begins with 'to'. Instead use 'as'. This means we have 'asBoolean', 'asInteger', 'asString' which expect to work just on pdf objects of the required type. 'toString' continues to work on all types and gives a printable version. We split 'toByteString' into 2 separate functions, one for acting on strings (asByteString) and one for acting on names (asByteName) more nicely mirroring the C level functions (pdf_to_string and pdf_to_name). For simplicity of use, we add asString and asName functions that return using java Strings rather than byte arrays. There are potential encoding issues with these, but then there are throughout our string handling at the moment, so we will deal with those in a followup commit. We also update the internal workings of several functions so that they never return NULL pointers, but rather return the null object. To avoid repeatedly creating new null objects we introduce a global static PDFObject.Null object. This is important as we want get("SomethingNonexistent") to return a valid java object, so we can safely do things like: get("Foo").get("Bar").get("Baz").asInteger() without having to error check at every stage. Update DocViewActivity to call the new versions.
2016-09-23Java code to get embedded profile name from a PDF.Robin Watts
To be used to make correct profile invocations.
2016-09-23Clean up annotation enum names.Tor Andersson
Put them in the PDF name space and separate words with underscores. Remove redundant namespace prefixes in java constants. Device.FLAG_MASK rather than Device.FZ_DEVFLAG_MASK. Use namespace for PDF annotation flag enum.
2016-09-21Android example - don't do any layout after the document has been destroyed.fred ross-perry
2016-09-17Android app: Update rgba -> bgra.Robin Watts
The separation class had a member renamed. Rename it here too.
2016-09-14Android example - delete temp files after proofing, destroy the document and ↵fred ross-perry
pages after use.
2016-09-14Android example: add options argument in calls to Page.toStructuredTextfred ross-perry
2016-09-14Android example - Add proofing support.fred ross-perry
2016-09-14Android example - drawing ink annotationsfred ross-perry
This commit puts in the UI for drawing with color and line thickness. But it does not yet save this to the document.
2016-09-14Android example - add button for toggling annotations.Fred Ross-Perry
2016-09-14Android example - file toolbar icons, password dialogFred Ross-Perry
add five icons to the File toolbar (not yet functioning) add a dialog to collect the password from the user for protected documents.
2016-09-14Android example - hook up the back button to finish the activity.Fred Ross-Perry
2016-09-13Update MuPDF Android build for Memento.Robin Watts
Call Memento_fin rather than piecemeal functions to ensure we get full details when available. Ensure we link with the required lib for backtracing to work in Memento builds.
2016-09-08Add options to control heuristics in structured text.Sebastian Rasmussen
2016-08-19Android example: added text searching.Fred Ross-Perry
2016-08-17Android example - add first page and last page buttonsFred Ross-Perry
also, change DocPageView to paint a white background before doing anything else. Makes for smoother-looking scrolling. And, re-introduce the slower scrolling (400 msec) when moving between pages.
2016-08-16Android example - update gradle versionfredross-perry
2016-08-16Android example - remove isBlank, start2=afterFirstLayoutComplete, ↵fredross-perry
ul/dr=upperLeft/lowerRight
2016-08-16Android example - simple implementation of reflow.fred ross-perry
page text (one page at a time) is converted to HTML and shown in a class that extends WebView.
2016-08-16Android viewer: get experimental proofing to build again.fred ross-perry
- use FZ_ENABLE_GPRF everywhere - chasing changed fz APIs in gprf-doc.c
2016-08-16Android example: fix initial layout timing issue.fred ross-perry
2016-08-16Android example - fix a crash bug by recycling bitmaps between documents.fred ross-perry
2016-08-16Android example : improved text selection.fred ross-perry
2016-08-08Android example - collected changesfred ross-perry
- move UI into the "mupdf" module. The app simply sets up a DocView and starts it with a file path. The app can call DocView.showUI to determine whether the built-in UI is used. The plan is for apps to be able to use the built-in UI, or supply their own. Also includes some rudimentary UI for show/hiding annotations, and listing links and outlines. Just for testing JNI features. - add toolbar and tabs at the top of the view. - refactoring DocView becomes DocActivityView, DocViewInner becomes DocView. - add Pages toolbar and page list view. make the page list a little narrower. give the document view and the pages view separate bitmaps, and have DocPageView implement clipping when it draws. - fix tabbing and brace style. - add simple text selection and highlighting. This is still a work in progress. - various code review items. fix tabs and brace styles remove function calls from loop statements use "highlight", not "hilight" put a few strings into resources avoid Right Hand Drift (tm) Rects are inclusive...exclusive for the purpose of testing limits put "else" on a separate line put "catch" and "finally" on separate lines
2016-07-31Java: Add import of ByteArrayOuputStream.Sebastian Rasmussen
This allows compilation using older Android NDKs. This was mistakenly omitted from commit 537a467dfd6392d70624805943ac65182ec881b4.
2016-07-18Bug 696662: Android viewer: data from URI stream fix.Robin Watts
Apparently, if MuPDF is invoked on a content stream that comes from a URI, then is.available() can report 0 bytes (as there is no data buffered). Use a modified formulation that reads as much data as possible from the stream into a BufferedOutputStream and then makes a byte array from that. Would be nicer if the core could actually read from the stream directly, perhaps, but that can wait for the new JNI based version. Thanks to Marc K for identifying the problem and supplying the patch.
2016-07-15android example - fix whitespace issue.fred ross-perry
2016-07-15android example: An attempt to improve the fluttering at the edges while ↵fred ross-perry
zooming and scrolling.
2016-07-15android example - add cacheing of page contents and annotations.fred ross-perry
2016-07-15android example - add a button to toggle annotationsfred ross-perry
2016-07-15android example - VERY brief build instructions.fred ross-perry
2016-07-15java - move fitz sources into a 'src' subfolder.fred ross-perry
2016-07-15Android viewer - fix bugs in mupdf.c associated with changing APIs.fred ross-perry
fz_bound_page needs the correct 2nd argument pdf_widget_get_type should be pdf_widget_type
2016-07-15Fix indentation for Java sources.Tor Andersson
2016-07-15Fix build breakage in Android viewer jni code.Robin Watts
2016-07-14Update android viewer with fz_close_device.Robin Watts
Reflect API change in example viewer.
2016-07-14Fix whitespace and indentation.Tor Andersson
2016-07-13Bug 696699: Fix Text extraction mediabox information.Robin Watts
Since the removal of the begin_page device function, structured text extraction has been unable to correctly establish the mediabox for extracted pages. Update the fz_new_stext_page call to take this mediabox information. This is an API change, but hopefully most people are calling fz_new_stext_page_from_page or fz_new_stext_page_from_display_list which are updated here to cope. Update all the apps/tools to behave properly.
2016-07-08android: Fix mixed tabs/spaces in DocViewActivity.java.Tor Andersson
2016-07-06Android example: modify to use new JNI, N-up page displayfredrossperry
- uses AndroidDrawDevice for rendering - very simple sample app - mupdf-specific functionality in a module called "mupdf" - N-up page display - page rendering in a background task Signed-off-by: fredrossperry <fredrossperry@gmail.com>
2016-07-06Android viewer - replace missing build.gradle filefredrossperry
also, change SUPPORT_GPROOF to FZ_ENABLE_GPRF
2016-07-06Android viewer: add mupdf_native.c to buildfredrossperry
This is because platform/android/example also uses the resulting shared library.
2016-06-23modified mupdf.c and mupdf_native.c to adapt to APIs that have recently changed.fredrossperry
2016-06-13Fix Android viewer build with js.Robin Watts
The recent js change requires a makefile tweak.
2016-06-13Bug 696822: Refuse to save a pdf file incrementally if it would break.Robin Watts
If a file cannot be saved incrementally, then don't accept that as an option. In practise this means if someone asks to save a file incrementally, and it was repaired, or it uses encryption then throw an error. Add a new function to ask if it's safe to save a file incrementally, and use that in the appropriate places.
2016-06-08Bug 696826: Android Viewer: Cope with null itemRobin Watts
It seems that we can end up with a null item in MuPDFReaderView onSingleTap. Add some simple checks to avoid this.
2016-06-06Android Viewer: Fix jni code w.r.t pixmap alpha API changes.Robin Watts
Need to specify that we are using alphas now.
2016-04-26svg: Add SVG parser.Tor Andersson
svg: Implement graphics state stack. svg: Use idmap for symbol and use elements. svg: Put viewport and viewBox in state stack. svg: Rebase to version 1.9 master.
2016-04-22thirdparty: Update to openjpeg 2.1.0.Sebastian Rasmussen
2016-04-21Bump patch-level.Tor Andersson