summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2016-09-15JNI: Rename member variable to fit with usage.Sebastian Rasmussen
Page_getSeparation() does the corresponding conversion.
2016-09-15JNI: Check context in consistent way.Sebastian Rasmussen
Also there is no need to check self pointer since JVM does not even call the JNI binding for null pointers.
2016-09-15JNI: Fix compiler warning about unused variables.Sebastian Rasmussen
2016-09-14Redirect fprintf to android logcat in debug builds.Robin Watts
This makes debugging much simpler.
2016-09-14Rename helper function in mupdf_native.cRobin Watts
This avoids a symbol clash when using scripts/destatic.sh
2016-09-14Don't report addRef/dropRef events to Memento twice.Robin Watts
We call Memento_addRef etc in fz_keep_impXX functions, so don't call them in the callers too.
2016-09-14Fix typo in Memento header.Robin Watts
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-14Add scripts to remove/replace 'static' from functions.Robin Watts
Getting a backtrace out with missing functions makes the backtrace much less useful. Some backtrace routines (such as that used by Memento on Android) are incapable of resolving static functions. We therefore provide 2 scripts (scripts/destatic.sh and scripts/restatic.sh) that respectively remove and replace the 'static' from function definitions. The scripts do not affect "static inline" or "static const" definitions, and they are are restricted to working in the source directory (excluding source/tools), thirdparty/mujs and the platform/{java,android} directories. The transformed source should NOT be checked in. To avoid problems with clashing symbols, some functions are renamed or tweaked slightly in this patch.
2016-09-14Fix clang compiler warnings.Sebastian Rasmussen
2016-09-14Update android logging code within Memento.Robin Watts
Work around the problems in that androids logging only works in whole lines by buffering until we have one. Also, androids logging goes to a circular buffer that loses data when it overflows. Hack around this by adding a 1ms sleep after every line output.
2016-09-14Table should be static const.Robin Watts
2016-09-13Fix Memento Android backtrace code.Robin Watts
Thanks to Sebastian for pointing out that the demangling code wants a malloced block, cos it might realloc it. Drop back to the dumber version.
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-13Update Memento for Android.Robin Watts
Add backtrace abilities, and fix missing return value from android logging.
2016-09-13Add missing include.Robin Watts
Without this we don't pick up FZ_ENABLE_GPRF from the header correctly.
2016-09-13Bug 696984: Type 3 fonts bbox fixes.Robin Watts
The upshot of debugging this is that: 1) We can't trust the FontBBox. Certainly it appears that no one else trusts it. 2) We can't trust the d1 values in all cases, as it can lead to use rendering glyphs far larger than we'd want to. So we have the compromise used here. 1) We never clip to the FontBBox. 2) If the FontBBox is invalid, then we calculate the bbox from the contents of the data streams. 3) If the FontBBox is valid, and the d1 rectangle given does not fit inside it, then we calculate the bbox from the contents of the data streams. This could theoretically produce problems with glyphs that have much more content than they actually need, and rely on the d1 rect to clip it down to sanity. If the FontBBox is invalid in such fonts, we will go wrong. It's not clear to me that this will actually work in Acrobat/ Foxit/gs etc either, so we defer handling this better until we actually have an example. Tested with bug 694952, and bug 695843 which were the last 2 in this area.
2016-09-13Fix compiler warning.Tor Andersson
2016-09-12Add UsePDFX3Profile option to gproof deviceMichael Vrhel
The gproof device should make use of the output intent if it exists.
2016-09-12Correct rounding in gproof skeleton files.Robin Watts
In the gproof pipeline MuPDF first generates a skeleton file with page sizes in. Then it gets gs to generate individual pages for that file. In one case, the pdf file has a height of 203.4 - at 300dpi that's 847.5 device pixels. MuPDF was rounding that up to 848pixels, whereas gs was rounding it down to 847, causing an error on load. Adjust MuPDFs skeleton file generation so that it matches gs.
2016-09-09Fix incorrect type usage.Robin Watts
MSVC is obviously more picky than linux in some cases.
2016-09-09Fix VS2005 build; missing stat definition.Robin Watts
Windows requires sys/stat.h to be included.
2016-09-09Add newly added files missing from VS project.Robin Watts
2016-09-08Use fz_vsnprintf() in x11 viewer.Sebastian Rasmussen
2016-09-08Limit length of fontfile name in fontdump.Sebastian Rasmussen
2016-09-08Add options to control heuristics in structured text.Sebastian Rasmussen
2016-09-08Make fz_option_eq() available outside of pdf-writer.Sebastian Rasmussen
2016-09-08Handle too big pixmap by printing error message in X11 viewer.Sebastian Rasmussen
2016-09-08JS: Add Path.bound() and Path.transform() similar to JNI.Sebastian Rasmussen
2016-09-08EPUB and XPS may only be zip archives or directories.Sebastian Rasmussen
2016-09-08Add support for GNU tar archives.Sebastian Rasmussen
2016-09-08Make fz_archive a generic archive type.Sebastian Rasmussen
Previously it was inherently tied to zip archives and directories. Now these are separated out into distinct subclasses. This prepares for support for further archive formats.
2016-09-08JNI: Separating big fz_try()s into smaller scopes.Sebastian Rasmussen
By making the scope smaller fitz exceptions and Java exceptions can be disentangled. This makes it clearer what happens in failure cases.
2016-09-08JNI: Remove redundant cleanup.Sebastian Rasmussen
2016-09-08JNI: Delete local reference to text span font.Sebastian Rasmussen
If a large number of text spans uses a huge number of fonts the JMV may run out of local references since we never cleaned up the local reference to the font objects.
2016-09-08JNI: Copy data back to Java arrays.Sebastian Rasmussen
The Java arrays are the destination when reading from Buffer.
2016-09-08JNI: Make sure to keep fitz objects passed to Java objects.Sebastian Rasmussen
2016-09-08JNI: Handle errors from AndroidBitmap_unlockPixels().Sebastian Rasmussen
2016-09-08JNI: Move failure testing code outside of fz_try().Sebastian Rasmussen
2016-09-08JNI: Use Android enum for detecting failure.Sebastian Rasmussen
2016-09-08JNI: Add a number of new to_*() C to Java conversions.Sebastian Rasmussen
Adding to_Rect_safe(), to_jRectArray_safe(), to_ColorSpace_safe() to_Image_safe() and to_Point_safe() disentangles fitz exceptions from Java exception and also makes the code more uniform.
2016-09-08JNI: Handle exceptions from JVM properly.Sebastian Rasmussen
2016-09-08JNI: Cosmetic reordering of code.Sebastian Rasmussen
Including removal of unnecessary #ifdef.
2016-09-08JNI: Throw OutOfBoundsException for out of range values.Sebastian Rasmussen