Age | Commit message (Collapse) | Author |
|
The JNI implementation is taken from core.textAsHtml() in the old
viewer.
|
|
|
|
added TextBlock, TextLine, TextSpan and TextChar inner classes to StructuredText.
Calling StructuredText.getBlocks() returns an array of TextBlocks, which in turn
contains an array of TextLines, etc.
|
|
|
|
Added methods:
* PDFDocument.hasUnsavedChanges()
* PDFDocument.canBeSavedIncrementally()
The interface for PDFDocument.save() now returns
the number of errors encountered while saving.
|
|
|
|
|
|
|
|
|
|
Previously in many instances the code was allowed to continue
after running jni_rethrow() or jni_throw(). When doing so it
used variables whose values may have changed inside fz_try().
Those variables must in that case be declared using fz_var().
Another way of avoiding this from happening (and thus having
to use fz_var()) is to return from the function immediately
after jni_rethrow()/jni_throw(). All remaining occurrances
where this is not possible still needs fz_var().
The code is now changed so that it either uses fz_var() or
returns early to avoid using variables that have not been
declared using fz_var().
|
|
|
|
Would be fine were it not for the finite number of local
refs we are allowed.
|
|
Previously an exception was thrown for documents without an outline.
Now document both with and without an outline are handled correctly.
|
|
|
|
|
|
This is for easy of use, in addition to accepting Buffer.
|
|
|
|
|
|
|
|
|
|
Some objects get their interfaces expanded or the entire object
is added both corresponding to what was already present in the
mujs interface. Some interfaces, e.g. Buffer.writeLines() has
been adapted to suit Java.
|
|
* Make sure that arguments are checked for NULL before being
passed to ->Get JNI-functions (as these may crash on NULL).
* Remove unused argument to from_Device().
* Consistently use jint and jfloat in JNIEXPORTed functions.
* Check ctx for NULL in all relevant functions.
* Throw Java exception when constructors fail.
* to_*_safe() means that the function doesn't fz_throw().
* to_*_own() means that the function takes ownership of the object.
* Make sure that jprefixing of argument identifies does not
clash with jprefixing of types, specifically jstring.
* Rename (j)colorspace -> (j)cs, (j)shade -> (j)shd,
(j)device -> (j)dev.
* Always check that the context is available in bindings.
* Always check that required arguments are non-NULL or have
decent default values (e.g. for fz_matrix and fz_rect).
|
|
We pass pointers from the JNI layer into the java to be stored
as java longs. When doing this it is VITAL that we cast them
correctly as otherwise the JNI layer on android has problems -
presumably because of alignment in the procedure calling
standard.
I'd missed this in one place. Fixed here.
<log></log>
|
|
I was forgetting to 'keep' the annot.
Inspection of the code shows just 1 other place where I've
made that mistake, and it's currently disabled (but updated
here anyway).
|
|
Use Windows threads rather than pthreads when building on
windows.
|
|
|
|
Closing a device or writer may throw exceptions, but much of the
foreign language bindings (JNI and JS) depend on drop to never throw
an exception (exceptions in finalizers are bad).
|
|
- 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>
|
|
|
|
|
|
|
|
Garbage collected languages need a way to signal that they are done
with a device other than freeing it.
Call it implicitly on fz_drop_device; so take care not to call it again
in case it has been explicitly called already.
|
|
|
|
platform/java and platform/android are reorganized:
platform/java
The new JNI Java classes, mupdf_native.{c,h}, Makefile and Makejar.
platform/java/example
The example desktop viewer classes.
platform/android/viewer
The original demo viewer.
ndk-build is used to build libmupdf_java.so,
making reference to mupdf_native.{c,h} in platform/java.
|
|
|
|
To be moved into a new document writer interface later.
|
|
|
|
Add code to convert to and from fz_text_language codes from
ISO 639 language strings. No validation is carried out.
|
|
|
|
|
|
|
|
jni: Various cleanups.
Fix gcc and clang warnings.
Android specific functions are guarded by HAVE_ANDROID define.
The java guts of the android stuff is removed for now, to be added back in later.
Set up a makefile and simple tests to build for desktop java.
Rerig device classes to: Device, NativeDevice, JavaDevice and DrawDevice.
Add Pixmap class.
Regularize naming.
General cleanups and abbreviate naming.
Use to_JavaClass and from_JavaClass rather than
fz_mupdf_struct_from_JavaClass and JavaClass_from_fz_mupdf_struct.
Check for exceptions thrown by java devices and path processor.
Tweak constructors and finalizers to remove the JavaDevice subclass.
Use toString when rethrowing java exceptions as fitz exceptions.
|
|
Move the platform independent java code from platform/android to
platform/java.
The plan is that we can call 'make mupdf.jar' (or 'nmake mupdf.jar')
there, and then use the resultant mupdf.jar/mupdf_native.h files in
whatever platform specific project (such as the android bindings) we
like.
Keep the android specific class (AndroidDrawDevice) in the
usual place in platform/android.
Update the android ant script to include mupdf.jar.
|