Age | Commit message (Collapse) | Author |
|
Avoids the silliness of fz_annot_type pdf_annot_type().
|
|
|
|
|
|
Use the MUPDF_EXTRA_CFLAGS, CPPFLAGS, LDLIBS, and LDFLAGS variables.
|
|
|
|
Adds a requirement on the caller to free the returned strings.
|
|
|
|
|
|
|
|
We were previously using the font's family as its name. Now if only one
of family and style are defined we use that. If both are present we
concatenate family and style with an intervening space, unless style
already has family as a prefix, in which case we just use the style.
Better would be to use the font's full name, but that is more difficult
to obtain via the freetype API.
|
|
|
|
|
|
Previously the call to fz_convert_pixmap() threw causing a destination
pixmap leak. This illustrated a bigger issue with the error handling
so now all types of pixmaps are dropped and care is taken to also end
the knockout group, should there be any.
|
|
Only attempt to progress to new page tree nodes if a new node to
process has actually been found. Previously if e.g. doc.findPage(1)
was called in murun for a single page document the error message was
"cycle in page tree" because the single page tree node was visited
twice. Now the error message is "cannot find page 1 in page tree",
which is more accurate.
|
|
|
|
Call these from the PDF interpreter. Make the DisplayList and
Trace devices cope.
Use these in the SVG output device.
|
|
|
|
Don't use directly loaded objects; since the image code assumes
that you always use an indirect reference to the dictionary/stream.
|
|
Previously the trailing null terminator would not be written if the
formatted string ended up longer than the buffer.
|
|
|
|
Previously mupdf would attempt to load any indirect reference,
whether it was a stream or not.
|
|
Previously the JBIG2 globals object might be indirect and if that
reference pointed to the object containing the stream itself then
mupdf would recurse until running out of error stack. Thanks to
oss-fuzz for reporting.
|
|
|
|
Use a FZ_PRINTFLIKE macro instead.
|
|
|
|
Events such as mouse up/down can cause a change to the appearance of a
widget annotation. That the change has happened is flagged by incrementing
the iteration count of the appearance stream. The widget is then recognised
as dirty when the ap_iteration value, stored in the pdf_widget structure,
differs from the appearance stream's actual iteration.
This commit removes a line of code that wrongly reset the iteration to 1
each time load_or_create_form was called, hence masking the widget being
dirty.
|
|
|
|
|
|
|
|
|
|
|
|
It should only return true for indirect references that are actually
streams, not just any array/dict that is contained in a stream object.
|
|
length.
|
|
fz_write_byte forgot to write the byte after needing to flush
the buffer.
|
|
Remove direct inclusion of pkcs7 source from the mupdf project and
create a separate libpkcs7 project with others as dependants
|
|
|
|
SIZE_MAX is surprisingly supposed to be in stdint.h, but Android
headers for API levels < 21 accidentally put SIZE_MAX in limits.h.
Headers for API levels >= 21 correctly moved SIZE_MAX to stdint.h.
This is the situation for Android NDK r14 and earlier.
Android NDK r15 and later implement a header unification strategy:
all sets of headers for each API level are combined into a single
set of headers covering all API levels. Any differences are
expressed by #ifdeffing on __ANDROID_API__. When this was done
the moving of SIZE_MAX from limits.h to stdint.h was kept and,
importantly, no #ifdefs were used in limits.h/stdint.h concerning
SIZE_MAX. This means that the move of SIZE_MAX was retroactively
introduced for API levels < 21 in Android NDK r15 and later.
For this reason whenever mupdf uses SIZE_MAX it must include both:
* stdint.h (not just in order to follow the POSIX specification,
but also to compile successfully using Android NDK r15 and later)
* and limits.h (in order to compile successfully using Android NDK
r14 and earlier)
Hence these need to include both stdint.h and limits.h, because:
* source/fitz/memory.c uses SIZE_MAX
* source/fitz/store.c uses SIZE_MAX
The mupdf header include/mupdf/fitz/system.h includes stdint.h so
any file that includes system.h will automatically have stdint.h
This is true for both files. limits.h on the other hand needs to
be explicitly included by whomever uses SIZE_MAX. This was already
done by source/fitz/store.c but not by source/fitz/memory.c, but
has now been added.
|
|
|
|
|
|
Previously mupdf would silently ignore this situation and leave the
buffer uninitialized leading to further issues. Thanks to oss-fuzz
for reporting.
|
|
Previously, while at the very last glyph mupdf would allocate a
new array for a run of distinct glyph widths and then not drop it
while leaving the function. Now a new run of font widths is only
started if not at the very last glyph.
|
|
Thanks to oss-fuzz for reporting.
|
|
|
|
|
|
|
|
|
|
This was forgotten when a gray colorspace was used as a fallback
in case a colorspace was never set. Thanks to oss-fuzz for reporting.
|
|
Add a version of pdf_check_signature function that reports no support,
for builds without openssl. This allows the removal of ifdefs from the
apps.
|
|
|
|
|