summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2016-09-23Android example: Make selected display profile persistentFred Ross-Perry
Also, we attempt to start the proofing at the currently-being-viewed page.
2016-09-23Android example: add embedded profile to print profiles listFred Ross-Perry
In the proof dialog, when the document has an embedded print profile, add it to the top of the list of choices. If it's selected, send <EMBEDDED> into gs instead of a file name.
2016-09-23Android example: tweak Apply button in proofing dialog.Fred Ross-Perry
Enable Apply button in proofing only when color checkboxes are changed.
2016-09-23Android example: move kankan module.Fred Ross-Perry
Out of platform/java and into the platform/android/example.
2016-09-23Fix leak in error case of pdf_add_stream.Robin Watts
2016-09-23JNI: Fix typo in logic.Robin Watts
2016-09-23JNI: Rework conversion functions and nulls.Robin Watts
Java has a convention that 'toString' should return a printable version of an object. We cannot both support this, and support a sane naming of functions to interpret pdf objects that begins with 'to'. Instead use 'as'. This means we have 'asBoolean', 'asInteger', 'asString' which expect to work just on pdf objects of the required type. 'toString' continues to work on all types and gives a printable version. We split 'toByteString' into 2 separate functions, one for acting on strings (asByteString) and one for acting on names (asByteName) more nicely mirroring the C level functions (pdf_to_string and pdf_to_name). For simplicity of use, we add asString and asName functions that return using java Strings rather than byte arrays. There are potential encoding issues with these, but then there are throughout our string handling at the moment, so we will deal with those in a followup commit. We also update the internal workings of several functions so that they never return NULL pointers, but rather return the null object. To avoid repeatedly creating new null objects we introduce a global static PDFObject.Null object. This is important as we want get("SomethingNonexistent") to return a valid java object, so we can safely do things like: get("Foo").get("Bar").get("Baz").asInteger() without having to error check at every stage. Update DocViewActivity to call the new versions.
2016-09-23Java code to get embedded profile name from a PDF.Robin Watts
To be used to make correct profile invocations.
2016-09-23Clean up annotation enum names.Tor Andersson
Put them in the PDF name space and separate words with underscores. Remove redundant namespace prefixes in java constants. Device.FLAG_MASK rather than Device.FZ_DEVFLAG_MASK. Use namespace for PDF annotation flag enum.
2016-09-23Check for buffer overflow in strtod ascii division.Tor Andersson
2016-09-23Fix warning: set but unused variable.Tor Andersson
2016-09-23Add 'make android' target to build android viewer.Tor Andersson
2016-09-23Update MuJS.Tor Andersson
2016-09-22GPROOF: Modify gs invocation.Michael Vrhel
If we get the print profile given as '<EMBEDDED>' then use the print profile (Output Intent) embedded in the file. If not, we continue to use the defaults if given the empty string, or the given file otherwise.
2016-09-23Bug 697021: Count used string space correctly.Sebastian Rasmussen
Account for used space before comparison, not after.
2016-09-23Bug 697020: Remove variable only ever written to.Sebastian Rasmussen
2016-09-22Include Java files when creating source tags.Sebastian Rasmussen
2016-09-22tools: Prefer fz_atof() to atof().Sebastian Rasmussen
2016-09-22GProof: When invoking gs, redirect gs stdio to local stderr.Robin Watts
For android this means it will go to our logging. This moves the code out of gs.
2016-09-22Bug 697015: Avoid object references vanishing during repair.Robin Watts
A PDF repair can be triggered 'just in time', when we encounter a problem in the file. The idea is that this can happen without the enclosing code being aware of it. Thus the enclosing code may be holding 'borrowed' references (such as those returned by pdf_dict_get()) at the time when the repair is triggered. We are therefore at pains to ensure that the repair does not replace any objects that exist already, so that the calling code will not have these references unexpectedly invalidated. The sole exception to this is when we replace the 'Length' fields in stream dictionaries with the actual lengths. Bug 697015 shows exactly this situation causing a reference to become invalid. The solution implemented here is to add an 'orphan list' to the document, where we put these (hopefully few, small) objects. These orphans are kept around until the document is closed.
2016-09-22Bug 697018: Avoid recursing infinitely on dicts in mutool info.Sebastian Rasmussen
2016-09-21fix the quotes fixfred ross-perry
2016-09-21Bug 697106: Mark 64bit constants as such.Robin Watts
Avoids gcc giving spurious warnings.
2016-09-21Gproof GS invocation: Only quote profile names if required.Robin Watts
We need to quote profile names if we use system, but not if we use the GS_API. Update the code to cope.
2016-09-21Update GPRF invocation of GSRobin Watts
Have both the GSAPI and non GSAPI invocations be identical. Remove the -rxx bit because it is not required when using -gWxH and -dFitPage. Add some simple debug code.
2016-09-21Android example - don't do any layout after the document has been destroyed.fred ross-perry
2016-09-20Fix Memento crashRobin Watts
When reallocing set the rawsize before attempting to write the post guard block.
2016-09-20Sync Memento with gs.Robin Watts
Including: Bug 697134: Tweak MEMENTO_GS_HACKS inclusion. Rather than rolling our own memset prototype in this case, use the one that gs provides. And, bug 697133: Fix typo in Memento. Causing a significant slowdown. Thanks to George Burgess IV for spotting this.
2016-09-20Avoid signed/unsigned warnings.Robin Watts
2016-09-20SVG: If no width/height given, then guess from viewBox.Robin Watts
2016-09-19Update SVG document handler; circles.Robin Watts
Cope with circles, rounded rects, etc. Not the worlds best approximation to a circular arc, but it's better than nothing.
2016-09-19fz_store: Reap passes.Robin Watts
A few commits back, we introduced the fz_key_storable concept to allow us to cope with objects that were used both as values within the store and as parts of keys within the store. This commit worked, but showed up performance problems; when the store has several million PDF objects in it, bulk changes (such as dropping a display list or document) could trigger many passes across the store. We therefore introduce a mechanism to ameliorate this. These passes, now known as "reap passes", can be batched together using fz_defer_reap_start and fz_defer_reap_end. We trigger this start/end around display list dropping, and around PDF content stream processing. This should be fine, as deferral will be interrupted if we ever run our of memory during mallocing.
2016-09-19Make fz_printf() handle %lu.Sebastian Rasmussen
2016-09-19jpx: Fix off by one in palettized images.Sebastian Rasmussen
2016-09-19svg: Throw on nonconforming transform attributes.Sebastian Rasmussen
2016-09-18svg: Use fz_atof() and fz_strtod().Sebastian Rasmussen
2016-09-18Make printing empty hash table entries optional.Sebastian Rasmussen
2016-09-18Fix printing of hash table.Sebastian Rasmussen
2016-09-18Make fz_printf() support %p.Sebastian Rasmussen
This is used at several places in mupdf.
2016-09-18svg: Ensure that read svg file is null-terminated.Sebastian Rasmussen
fz_parse_xml() assumes a null-terminated xml string.
2016-09-18svg: Fix typo in opacity attribute variable name.Sebastian Rasmussen
2016-09-18Free fz_tree nodes when dropping tree.Sebastian Rasmussen
2016-09-18tiff: Do not assume that images always have alpha component.Sebastian Rasmussen
2016-09-18JNI: Finalizers must be able to run with pointer being null.Sebastian Rasmussen
Applications must be able to run e.g. Document.destroy() and later set that reference to null and have the JVM successfully run the finalizer an arbitrary time later. Previously the JVM would fail to do so because the finalizer would throw an exception since the native pointer was null.
2016-09-17Squash some memento warnings in MEMENTO_LEAKONLY builds.Robin Watts
2016-09-17Android app: Update rgba -> bgra.Robin Watts
The separation class had a member renamed. Rename it here too.
2016-09-17Java bindings: Improve exception messagesRobin Watts
2016-09-16Remove unused variable.Robin Watts
2016-09-16Correct assertion in pdf-store.Robin Watts
We can use names as keys for colorspaces. These are not bound to a particular document.
2016-09-16Add some missing #ifdeffery for Memento.Robin Watts