Age | Commit message (Collapse) | Author |
|
|
|
- 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>
|
|
also, change SUPPORT_GPROOF to FZ_ENABLE_GPRF
|
|
This is because platform/android/example also uses the resulting shared library.
|
|
|
|
The recent js change requires a makefile tweak.
|
|
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.
|
|
It seems that we can end up with a null item in MuPDFReaderView
onSingleTap. Add some simple checks to avoid this.
|
|
Need to specify that we are using alphas now.
|
|
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.
|
|
|
|
|
|
Update description to cover the fact that we no longer need
cygwin, and to strongly suggest using the Android Studio
supplied SDK/NDKs.
|
|
|
|
Also remove redundant assignments.
Fixes http://bugs.ghostscript.com/show_bug.cgi?id=695968
|
|
Thanks to Fred Ross-Perry.
|
|
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.
|
|
|
|
We were converting from a File to a filename then to a Uri
using Uri.parse, but Uri.parse has problems with hash marks.
Instead convert direct from File to Uri.
|
|
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.
|
|
The purpose of JNI bindings is to allow MuPDF to be driven from
Java. There are several possible use cases here.
Firstly, and most simply a java application can ask the core of MuPDF
to open a document and render it using the existing devices to
produce output on a standard Java bitmap.
Secondly, a java application might want to drive the device interface
itself, making use of the standard MuPDF devices (such as using the
rendering engine to render high quality graphics).
Thirdly, a java application might want to implement its own device
and then call MuPDF to run the document to that device (perhaps to do
custom text or image extraction).
The first of these cases requires a simple reflection of the main
document and standard device classes in JNI.
The second of these cases requires the actual device interface itself
to be made available as a java interface, together with the ability
to construct and manipulate data types like paths, text and fonts so
the Java code can build the required objects to pass to implementers
of the device interface.
The final case requires a reflection layer whereby calls through the
device interface in C can be turned into method calls to a Java
interface.
All of this is attempted in this commit. Some highlights:
For each type in the C (such as fz_colorspace) we have a corresponding
java class (such as ColorSpace).
Where the 'fz_' types are reference counted (such as an fz_colorspace),
the java objects (such as ColorSpace) simply take a reference to a
pointer to the underlying fz type. Java accessor methods are then
provided to manipulate these types.
Where the 'fz_' types are not reference counted (such as an fz_rect),
the data is actually contained within the Java object itself (such as
Rect, RectI and Transform).
We add a VS jni project. This doesn't do anything except make the
files accessible for editing in the IDE.
As much as possible, the Java layers do nothing (other than some
programmer friendly type overloading), construction (unavoidable,
as can't be done in JNI) and boiler-plate destruction. All the
smartness is done in the C.
Due to Java and C's differing approach to constness, we need to be
careful that a java device does not destructively alter objects
passed to it. For example, consider running a display list through
a device implemented in java. If the java device were to change a
Font object passed to it, this might affect other objects in the
display list that shared the same underlying fz_font.
Possibly we can achieve this by having an 'isConst' flag on java
objects that are created from device calls and passed to the Java
device (see the Text class, for an attempt at this currently).
This could alternatively be achieved by cloning every such
piece of data (see the path code for an example of this approach),
but this is probably slow. Better to clone 'just in time' as the
first write operation is done to the object.
|
|
|
|
|
|
|
|
|
|
In preparation of adding pdf_write_document that writes a document
to a fz_output stream.
|
|
Separate naming of functions that save complete files to disk
from functions that write data to streams.
|
|
Push the pointer->long and long->pointer casting through 2
static inline functions.
|
|
Less risk of confusion with the text type used in the device interface.
|
|
|
|
|
|
arrays
The list box and combo box can have values that are 2-element arrays. The first element
is the "export" value and the second element is the value that should be shown
in the list box UI. This fix ensures that we get the proper value to show in the UI.
Also, it adds the option to get the export values. These are needed if you wish to
update the field dictionary's V (value) entry, which is the currently selected values(s).
This fix works well with gsview. The other viewers will now display the proper content
in their UI, (unlike before this fix) but may need a bit more work to ensure that the
proper V (value) is updated with changes in the selections. In addition, we add
selection rectangles to the selected list box items.
|
|
|
|
- use core.fileFormat to decide whether a proof file is being viewed,
- don't show the proofing button except for PDF files.
- in a proofing activity, show the page that was being viewed when
the proof was requested.
- Add extra two arguments to fz_write_gproof_file in the Android build.
|
|
Probably related to bug 695507.
|
|
|
|
Android wants colors to be BGRA, not RGBA, so accomodate this.
|
|
Explicitly pass the page number into separation related
functions.
|
|
Get separation information out to the Java level.
|
|
If we build with DEBUG set, the native section will be built
with debugging enabled.
The debuggable flag in AndroidManifest still needs to be edited
manually, but it's set explicitly false here so we can grep for
it.
Also, send stdout/stderr to text files in DEBUG builds. The path
for this may not work on all phones (it certainly works on the
LG G3, running Lollipop), but it won't hurt on anything.
|
|
MuPDFCore now supports a gprfSupported method that returns
true iff we compiled the core with SUPPORT_GPROOF and a
libgs.so is available.
|
|
Hit the proofing button, and we create a new temporary .gproof file.
We invoke a new version of MuPDF on that. When that finishes control
returns to us, and we delete the .gproof file.
Currently the new version of MuPDF loads the .gproof file, but fails
to generate any pages from it, as we have no version of ghostscript
on the system. Generating this new ghostscript is the next job.
|
|
Doesn't actually trigger generation from ghostscript, or load
images from files generated by ghostscript yet.
|
|
|
|
|
|
Add fz_has_permission function to fz_document.
Add fz_lookup_metadata function to fz_document.
Remove fz_meta function from fz_document.
|
|
|
|
Update FZ_VERSION to 1.7
Update Android app version.
|