Age | Commit message (Collapse) | Author |
|
|
|
|
|
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).
|
|
|
|
|
|
|
|
|
|
|
|
The "contents" field is the same as the "obj" field, so can also be
removed.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Return the empty rectangle and identity matrix when the pdf object
is missing or not an array.
|
|
We want to turn pdf_page into a thin wrapper around a pdf_obj, so that
any updates to the underlying PDF objects will be reflected without
having to reload the pdf_page.
|
|
|
|
|
|
The mark & sweep pass of garbage collection, and resolving indirect objects when grafting objects
was following the full chain of indirect references. In the unusual case where a numbered object
is itself only an indirect reference to another object, this intermediate numbered object would
be missed both when marking for garbage collection, and when copying objects for grafting.
Add a function to resolve only one step for these two uses.
The following is an example of a file that would break during garbage collection if we
follow full indirect reference chains:
%PDF-1.3
1 0 obj
<</Type/Catalog /Foo[2 0 R 3 0 R]>>
endobj
2 0 obj
4 0 R
endobj
3 0 obj
5 0 R
endobj
4 0 obj
<</Length 1>>
stream
A
endstream
endobj
5 0 obj
<</Length 1>>
stream
B
endstream
endobj
|
|
The generation number is only needed for decryption, and is assumed
to be zero or irrelevant for all other uses.
Store the original object number and generation in the xref slot, so
that we can decrypt them even when the objects have been renumbered,
without needing to pass the original object number around through
the stream loading APIs.
|
|
|
|
Affects pdfclean, pdfmerge, and pdfposter.
|
|
|
|
|
|
The PDF repair code suffered an buffer index overflow while searching
the buffer of file data if the file (and hence the buffer) was
sufficiently small. This also happened while attempting to open a path
pointing to a directory as they are treated as zero byte files.
|
|
The values returned from the pdf_annot_{contents, author, date}
functions should not be altered, hence make it const.
|
|
GSView will make use of the details about the annotations including
the author, the date and which annotation the annotation is in
reply to. This commit provides the interface to do this easily.
|
|
Remap glyphs using presentation form code points rather than having
a separate vertical variant of the CJK font using truetype collections.
Recreate DroidSansFallback fonts from original source,
extend the glyph coverage from DroidSans,
subset the glyphs to match CJK CID collections,
and optimize the outlines using fontcrunch.
|
|
Commit 4a4e6adae4c1a0e9ab3b6fad477edfe26c1a2aca introduced a typo
when doing the int -> size_t conversion. This caused a coverity
warning which is now fixed.
|
|
|
|
To return the proper size from fz_bound_display_list, which has been
broken since the begin_page device call was removed.
|
|
Allows us to remove the out parameter 'transform' from fz_begin_page.
|
|
This stops Bug693111.pdf giving errors.
|
|
This silences the many warnings we get when building for x64
in windows.
This does not address any of the warnings we get in thirdparty
libraries - in particular harfbuzz. These look (at a quick
glance) harmless though.
|
|
|
|
Makes it easier to chain function calls.
|
|
Broken due to refactoring. Thanks to Michael for spotting this.
|
|
|
|
If thirdparty/luratech is populated then this decoder will be preferred
over jbig2dec (even if both are present).
|
|
Allow us to write a document to an fz_output as opposed to just a
filename.
We cannot write digital signatures in this method though. Will
ponder that in a later commit.
|
|
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.
|
|
This has knock on effects in the store.
fix
|
|
|
|
Omitting the unlisted UTF-8 and UTF-32 CMaps saves ~1M.
Omitting the unlisted other CMaps saves ~200k.
Define CJK_CMAPS=0 to skip all CMaps.
Define EXTRA_CMAPS=1 to include the various other CMaps.
Define UTF8_CMAPS=1 and UTF32_CMAPS to include the UTF-8 and UTF-32 CMaps.
|
|
Lab colorspaces had been broken due to incorrect clipping of
color values introduced in an effort to fix Bug 696796.
|
|
|
|
fz_pixmaps now have an explicit stride value. By default no change
from before, but code all copes with extra gaps at the end of the
line.
The alpha data in fz_pixmaps is no longer compulsory.
mudraw: use rgb not rgba (ppmraw), cmyk not cmyka (pkmraw).
Update halftone code to not expect alpha plane.
Update PNG writing to cope with alpha less input.
Also hide repeated params within the png output context.
ARM code needs updating.
|
|
Add some paranoid checks to pdf_graft_object to prevent user
errors from crashing mupdf.
|