Age | Commit message (Collapse) | Author |
|
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.
|
|
Adopt (slightly modified) version of Kenny Lam's patch to allow
panning while zooming. This more closely matches how a web view
behaves.
|
|
Thanks to Goncalo Ferreira for spotting this.
|
|
Given that MuPDFReaderView has a public setMode call, ensure that
the enum with the Mode values in is public too.
Thanks to Jeremy Dixon for pointing out the issue.
|
|
I can't claim to entirely understand why one formulation works and
the other doesn't, but it seems a harmless enough fix that apparently
works.
|
|
|
|
Update android Core.mk file for html document handler, and fix a
stray fz_free_page that didn't get updated.
|
|
Purge several embedded contexts:
Remove embedded context in fz_output.
Remove embedded context in fz_stream.
Remove embedded context in fz_device.
Remove fz_rebind_stream (since it is no longer necessary).
Remove embedded context in svg_device.
Remove embedded context in XML parser.
Add ctx argument to fz_document functions.
Remove embedded context in fz_document.
Remove embedded context in pdf_document.
Remove embedded context in pdf_obj.
Make fz_page independent of fz_document in the interface.
We shouldn't need to pass the document to all functions handling a page.
If a page is tied to the source document, it's redundant; otherwise it's
just pointless.
Fix reference counting oddity in fz_new_image_from_pixmap.
|
|
Rename fz_close to fz_drop_stream.
Rename fz_close_archive to fz_drop_archive.
Rename fz_close_output to fz_drop_output.
Rename fz_free_* to fz_drop_*.
Rename pdf_free_* to pdf_drop_*.
Rename xps_free_* to xps_drop_*.
|
|
|
|
Spotted by "Pogon". The code to choose between horizontal and vertical
scrolling was broken due to a missing ! in a condition. Cut and Paste
error.
|
|
|
|
|
|
|
|
|
|
A potential customer (currently a free user) contacted us asking
that MuPDF be extended to support vertical scrolling rather than
horizontal scrolling. He supplied a partially working patch.
We reviewed his patch, and found the bit he'd missed, which he added
and it now works for his purposes. We also spotted some places
where his patch is incorrect in general though (and will go wrong
for cases where PDF files have varying page sizes).
This is a commit of a correct version. ReaderView gains a
HORIZONTAL_SCROLLING boolean that is set to true currently to
maintain the normal behaviour. Change it to false and we will
scroll vertically instead.
Possibly we could add a button to allow this to be a runtime option,
but that's a future enhancement.
|
|
Patch from Michaël Cadilhac.
Continue to pass events to panning GestureDetector when zooming (but do not
act on the reported gesture).
Previously we just stopped sending events to the GestureDetector until the
start of the next gesture.
|
|
Memory buffers are used for implementing content:// URLs, which are
(in most cases) readonly. If we ever encounter a read/write content://
URL in the future, we could consider supporting saving to it.
(An example of a content:// URI is an email attachment, where IPC is used
to transfer the file from the email client, rather than relying on a local
file).
|
|
Causes a crash on Android L/ART.
|
|
I think this is non-standard, but some applications seem to use it.
The email app on Android uses it, despite the fact the original email
actually embedded it as application/octet-stream. I guess the email app
is looking at the filename.
|
|
Fixes opening non-PDF files from email programs that use a ContentProvider
to supply attachments.
|
|
On 2.3.x, opening files from the Android email app (not Gmail), was causing
a crash due to a SecurityException. On 4.x, it was failing with an error
message.
I think we should have just been calling
getContentResolver().openInputStream(uri) to get the file data, rather than
reading the row from the content resolver and looking at the _data field.
On 2.3.x querying this row caused a security error. On 4.x, we got back
a _data field containing a path, but this path was internal to the email
app, and not for our consumption.
Previously we were calling openInputStream() only as a fallback; now we try
it first, and fall back to the other method if that fails. I suspect we can
delete the other code, but I can't test on the 3.x version of the Transformer
Prime, so I'm leaving it be for now.
|
|
The GUI layout tool instantiates custom controls classes to display a
preview in the IDE. It relies on the 2-argument constructor being
implemented.
Use a different means to get the window manager that works for non-activity
contexts, and avoid creating gesture recognizers in this situation.
Based on a patch supplied by Masaki Muranaka
|
|
|
|
Use intptr_t when casting between a jlong and a pointer to suppress errors
about different size words.
Add a 'u' suffix to unsigned values output by the cmap dump utility.
|
|
Fixes bug #695191 - Mupdf Build49/armv7a & Android 3.1: cycles
through subset of pages & page scrubber
The problem here was that in Honeycomb, various bitmap operations
(including drawing via JNI) do not update the bitmap generation count.
When hardware acceleration is enabled, this means that the underlying GL
layer is not aware that the bitmap has changed, and ends up reusing old
textures.
To workaround this, we erase the bitmap before drawing the page. Erase
appears to be the only operation I could find (after pouring through the
source), which actually increments the generation count. The other option
would have been to disable hardware acceleration, but that was far less ideal.
|
|
env/clazz pointers in globals.
The env/clazz pointers are stashed in the globals structure so that they can
be accessed by callback functions in mupdf.c (such as bufferStreamSeek()).
The intention is that only one thread (i.e. the AsyncTask background thread)
reads/writes these stashed pointers. Because cookies are created/destroyed
in the main thread, we add a new version of get_globals() which doesn't trample
these pointers.
|
|
to file and open from file works
Patch was supplied by gong_su@hotmail.com. Thanks!
|
|
then pressing back button again.
I've also added an onCancel() handler, so that the back button only needs
to be pressed once to return to the file picker view.
Spotted while looking at bug #693719 - Attached PDF file does not display (edit)
|
|
crash when rotating the device.
When cancelling a render async task, we now wait for it to actually finish
before continuing. The benefit of this is that we should be able to guarantee
that its Bitmap becomes eligible for GC before we continue to create any
new bitmaps.
This should hopefully help with the OOM errors seen when rotating
the device and trying to create the new bitmaps.
To prevent the UI thread from being blocked for too long while we're waiting
for the async task to finish, we use a fz_cookie and set the 'abort' flag to
request the render be stopped as soon as possible.
|
|
|