summaryrefslogtreecommitdiff
path: root/android/jni
AgeCommit message (Collapse)Author
2013-06-09Remove fz_interactive API in favour of direct use of pdf APIPaul Gardiner
2013-05-30Android manifest tweaks.Robin Watts
Make it easier to do release builds.
2013-05-29Remove unneccessary variables in android makefiles.Tor Andersson
2013-05-27Fix a crash when saving a file in the android app.Robin Watts
When saving, we'd close the document before we save it. As part of the leak fixing work, I'd freed the path as part of the closing process. Rework slightly to avoid this.
2013-05-27Pull in latest fixes to jbig2dec.Robin Watts
Also fix android building with latest openjpeg2.
2013-05-27Treat multiple whitespace in search strings as single.Robin Watts
Skip over successive whitespace in search string. Make android use text_search.c
2013-05-27Fix indentation to be consistent with regard to tabs/spaces.Tor Andersson
2013-05-24Android: Update makefiles for new single lib V8 builds.Robin Watts
We have a new method of making V8 libs for android that results in a single lib rather than 2, and works on armeabi and x86 as well as armeabi-v7a.
2013-05-21Android: Fix crash when selecting text.Robin Watts
We were failing to setup and maintain the span number correctly.
2013-05-21Fix app breakages.Robin Watts
Android app was still thinking that we had only one fz_device_rgb rather than one per context. Android app had a typo in resulting in searching ending in an infinite loop. Text search failed to search outside the first block of each page.
2013-05-07Android: Fix android build.Robin Watts
Update android build in line with text extraction structure changes.
2013-05-06Add simple visual-to-logic RTL reordering as a text extraction pass.Tor Andersson
2013-05-06Add UCDN unicode character library.Tor Andersson
2013-05-03Simple Image file format recogniserRobin Watts
Now can open jpeg/png/tiff files within mupdf.
2013-04-30Split dev_text into three parts.Tor Andersson
One for the raw span extraction pass, one for paragraph sorting, and another for HTML output.
2013-04-30Android: Update text handling in android specific code.Robin Watts
Need to update text handling in line with new object types due to image extraction.
2013-04-29Android: Fix the makefile (again) for v8 or not.Robin Watts
Eventually I will get this right.
2013-04-29Add Memento build option to Android build. Fix memory leaks.Robin Watts
Following up on a report from a potential customer, fix various places in mupdf.c where we were leaking memory (devices not freed, context not properly freed etc). In order to track this down, I added a Memento build - just do: ndk-build MEMENTO=1 when building. This only checks for leaks, not for memory overwrites by default as it uses MEMENTO_LEAKONLY to avoid any possibility of the android kernel killing stuff for being too slow or using too much memory.
2013-04-29Android: Missed renaming of function.Robin Watts
We renamed fz_new_output_buffer to be fz_new_output_with_buffer, and missed the call from the Android specific source. Fixed here. Thanks to Philippe Le Becq for the report.
2013-04-18Android: Fix V8_BUILD makefile logic.Robin Watts
V8_OK needs to be set before the includes. LOCAL_LDLIBS need to be set after them.
2013-04-11Move pdf_image to fz_image.Robin Watts
In order to be able to output images (either in the pdfwrite device or in the html conversion), we need to be able to get to the original compressed data stream (or else we're going to end up recompressing images). To do that, we need to expose all of the contents of pdf_image into fz_image, so it makes sense to just amalgamate the two. This has knock on effects for the creation of indexed colorspaces, requiring some of that logic to be moved. Also, we need to make xps use the same structures; this means pushing PNG and TIFF support into the decoding code. Also we need to be able to load just the headers from PNG/TIFF/JPEGs as xps doesn't include dimension/resolution information. Also, separate out all the fz_image stuff into fitz/res_image.c rather than having it in res_pixmap.
2013-04-09Disable V8 usage on armeabi - only for armeabi-v7a for now.Robin Watts
Until someone can get me v8 libs that work on armeabi at least!
2013-03-29Android: some user-feedback improvementsPaul Gardiner
Disable some features when in reflow mode Disable features when document format prohibits Add a few instructional on-scrren, info messages
2013-03-26Make pdf_functions public as fz_functions.Robin Watts
Implementations remain unexposed, but this means we can safely pass functions in shades without having to 'sample' them (though we may still choose to do this for speed).
2013-03-26Reflow: Move from html output using tables to html output using div/spanRobin Watts
The div/spans still use table style rendering, but it's simpler code (and html) this way.
2013-03-26Rework text extraction structures.Robin Watts
Rework the text extraction structures - the broad strokes are similar but we now hold more information at each stage to enable us to perform more detailed analysis on the structure of the page. We now hold: fz_text_char's (the position, ucs value, and style of each char). fz_text_span's (sets of chars that share the same baseline/transform, with no more than an expected amount of whitespace between each char). fz_text_line's (sets of spans that share the same baseline (more or less, allowing for super/subscript, but possibly with a larger than expected amount of whitespace). fz_text_block's (sets of lines that follow one another) After fz_text_analysis is called, we hope to have fz_text_blocks split such that each block is a paragraph. This new implementation has the same restrictions as the current implementation it replaces, namely that chars are only considered for addition onto the most recent span at the moment, but this revised form is designed to allow more easy extension, and for this restriction to be lifted. Also add simple paragraph splitting based on finding the most common 'line distance' in blocks. When we add spans together to collate them into lines, we record the 'horizontal' and 'vertical' spacing between them. (Not actually horizontal or vertical, so much as 'in the direction of writing' and 'perpendicular to the direction of writing'). The 'horizontal' value enables us to more correctly output spaces when converting to (say) html later. The 'vertical' value enables us to spot subscripts and superscripts etc, as well as small changes in the baseline due to style changes. We are careful to base the baseline comparison on the baseline for the line, not the baseline for the previous span, as otherwise superscripts/ subscripts on the end of the line affect what we match next. Also, we are less tolerant of vertical shifts after a large gap. This avoids false positives where different columns just happen to almost line up.
2013-03-25Android: add support for Ink annotation creationPaul Gardiner
2013-03-21Bug 693719: Android: Catch exceptions when counting pages.Robin Watts
Return 0. Check for this case when opening a PDF and give a nice dialogue. Fix the nice dialogue code so that it doesn't crash afterwards due to a null mSearchTask.
2013-03-18Auto-generate appearance streams for strikeout, underline, highlightPaul Gardiner
This fixes bug #693664, and also simplifies app code. The example file attached to the bug produces strange results, but that is because the QuadPoint information is incorrect.
2013-03-04Avoid interactive features causing bloat in mutoolPaul Gardiner
2013-02-28Pass bbox to pdf_set_annot_appearance rather than base on display listPaul Gardiner
Use of the bbox device to derive the area of the display list can lead to bad results because of heuristics used to handle corners of stroked paths.
2013-02-27Android: Update *.mk files to allow for non-arm android builds.Robin Watts
We could do with non arm builds of v8 to go with these.
2013-02-26Android: add support for highlight and underline markup annotations.Paul Gardiner
Highlight annotations currently come out opaque so aren't a lot of use.
2013-02-26Include required quadPoints entry in created markup annotations.Paul Gardiner
Also change the way we pass the text rectangles so that non-axis-aligned ones can be permitted, and relocate the code that calculates the strike-out lines from the bounding boxes
2013-02-26Android: implement annotation deletionPaul Gardiner
2013-02-22Android: add MuPDFCore.getAnnotationsPaul Gardiner
2013-02-06Fix Android build after reference/irect changes.Robin Watts
2013-02-06Rename bbox to irect.Tor Andersson
2013-02-05Android: use identity matrix in html extraction to improve font sizesPaul Gardiner
2013-02-05Android: Use HTML output in reflow mode.Robin Watts
This gets us styles.
2013-02-04Add fz_output, and make output functions use it.Robin Watts
Various functions in the code output to FILE *, when there are times we'd like them to output to other things, such as fz_buffers. Add an fz_output type, together with fz_printf to allow things to output to this.
2013-01-31Android: fix buildPaul Gardiner
2013-01-31Android: use a single fz_page to render both main and hq bitmapsPaul Gardiner
2013-01-31Android: implement strikeout annotation creationPaul Gardiner
2013-01-30Parts of Robin's PDF editing/page creation commit useful for annotationsPaul Gardiner
2013-01-30Fix Android build after rect/bbox changes.Robin Watts
2013-01-30Eliminate fz_bbox in favor of fz_rect everywhere.Tor Andersson
2013-01-26Android: Fix NullPointerException seen on Google PlayRobin Watts
According to Google Plays automated crash detection, we get a NullPointerException when trying to parse a null string as a Uri. This turns out to be caused by us trying to open a PDF attachment from gmail. This is because MuPDF is invoked with a content:// URL that does not have a file associated with it. Instead we can open that URL as an InputStream. Here we amend MuPDF to spot that case, and to open the InputStream, suck the data into a byteArray, and then to use that to open the file from.
2013-01-21Rename app.Robin Watts
Due to a clash on Google Play, we need to rename the apps main class from com.artifex.mupdf to something else. We choose com.artifex.mupdfdemo. Any user of the code in their own app should rename it similarly. To simplify this process we add some macros in the C. Various renames and lots of tedious package name editing is still required in the Java though.
2013-01-10Android: add core method returning the words on a pagePaul Gardiner