Age | Commit message (Collapse) | Author |
|
Also, we attempt to start the proofing at the
currently-being-viewed page.
|
|
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.
|
|
Enable Apply button in proofing only when color checkboxes are changed.
|
|
Out of platform/java and into the platform/android/example.
|
|
|
|
|
|
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.
|
|
To be used to make correct profile invocations.
|
|
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.
|
|
|
|
|
|
|
|
|
|
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.
|
|
Account for used space before comparison, not after.
|
|
|
|
|
|
|
|
For android this means it will go to our logging. This moves
the code out of gs.
|
|
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.
|
|
|
|
|
|
Avoids gcc giving spurious warnings.
|
|
We need to quote profile names if we use system, but not if we
use the GS_API. Update the code to cope.
|
|
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.
|
|
|
|
When reallocing set the rawsize before attempting to write
the post guard block.
|
|
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.
|
|
|
|
|
|
Cope with circles, rounded rects, etc. Not the worlds best
approximation to a circular arc, but it's better than nothing.
|
|
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.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
This is used at several places in mupdf.
|
|
fz_parse_xml() assumes a null-terminated xml string.
|
|
|
|
|
|
|
|
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.
|
|
|
|
The separation class had a member renamed. Rename it here too.
|
|
|
|
|
|
We can use names as keys for colorspaces. These are not bound to
a particular document.
|
|
|