Tor Andersson [Fri, 9 Apr 2021 12:58:23 +0000 (14:58 +0200)]
Bug 703773: Fix buffer overwrite in util_printf_d when 'w' is too long.
Sebastian Rasmussen [Thu, 1 Apr 2021 18:12:08 +0000 (20:12 +0200)]
cbz: Add support for image orientation.
Robin Watts [Thu, 1 Apr 2021 18:41:23 +0000 (19:41 +0100)]
Fix harmless typo: init uint8_t with 0, not NULL.
Robin Watts [Thu, 1 Apr 2021 12:04:07 +0000 (13:04 +0100)]
Bug 703753: Add detection of Orientation from Exif images.
Add the concept of 'orientation' to fz_images. This is set to
the orientation defined in an image; currently only Exif format
images set this. This value is ignored by all internal rendering
functions.
The image document handler checks the orientation, and flips/rotates
the image as necessary when feeding it to the display functions.
Tor Andersson [Fri, 15 Jan 2021 16:48:02 +0000 (17:48 +0100)]
Bug 703205: Don't freak out about invalid indirect references.
Print a warning and turn them into 'null' so we don't throw away the
whole dictionary being parsed.
Sebastian Rasmussen [Thu, 3 Dec 2020 23:51:15 +0000 (00:51 +0100)]
Bug 703100: Avoid encrypting (and extending) signature digests
When creating a new digital signature in a PDF MuPDF asks the
PKCS7 signer for the maximum digest size and adds a zeroed out
dummy signature as a /Contents string to the signature
dictionary. When MUPDF saves the document to a PDF file using
encryption it used to also encrypt the /Contents entry. For
AESv2/v3 encryption schemes strings will be extended by 16-31
bytes owing to an preceding iv string and trailing padding. Next
MuPDF completes unsaved signatures by locating their signature
dictionary objects in the PDF file, finding the /Contents entries
and overwriting their values with the an unencrypted signature
digests calculated by the PKCS7 signer according to the ranges
specified by each signatures /ByteRange entry.
For the PDF from the bug the initial zeroed out signature digest
was extended by 17 bytes when encrypted, thus the reserved size
for the /Contents entry was 17 bytes larger. When completing the
unsaved signatures MuPDF would previously, in pdf_write_digest(),
compare this reserved size to that of the unencrypted zeroed out
dummy signature. These differed by 17 bytes and
pdf_write_digest() errored out.
The check revealed that the zeroed out dummy signature digests
were written using encrypting and then patched without
encryption. Despite this the check is misguided because it
compares the encrypted and unencrypted lengths of the zeroed out
dummy signature digest. The check was meant to compare the
reserved space for the signature digest to the size of the digest
calculated by the PKCS7 signer.
This commit implements the correct approach which is to not
encrypt the initial dummy signature digest /Contents entry while
writing objects to the PDF file, and compare the size of the
digest returned by the PKCS7 signer to the reserved space in the
PDF file. The check has been modified to throw an exception if no
digest is received or if the digest is larger than the reserved
space. Should the digest be shorter than the reserved space,
it will be zeropadded at the end until it cover the entire space.
Tor Andersson [Thu, 26 Nov 2020 14:51:26 +0000 (15:51 +0100)]
Bug 703179: Cope with updating deleted content tags.
If a marked content tag has a null mcid_obj, don't try to update it.
This can happen when the entire object is deleted during redaction,
in the case where we desync and cannot track the drawn text with the
structured text markup.
Tor Andersson [Wed, 25 Nov 2020 15:24:28 +0000 (16:24 +0100)]
Bug 703092: Fix logic error in structured text scanning.
When scanning the MCID string for a matching character when running
the process filter, in the case where we do not remove the character
we could get stuck at a space character in the input since we'd not
progress.
When we match a character we should either remove or skip it, so make
that decision more explicit.
This also fixes another potential bug where when we were removing
a matching character, str->pos would also be advanced so we would miss
scanning the next character after it.
Tor Andersson [Fri, 13 Nov 2020 11:30:51 +0000 (12:30 +0100)]
Fall back to system fonts in fz_new_cjk_font.
If we can't find a built-in CJK font, try calling the system font
callbacks before giving up. This is needed on Android where we don't
build in the CJK font because we can rely on the system to provide one.
Fred Ross-Perry [Fri, 23 Oct 2020 22:21:35 +0000 (15:21 -0700)]
Fix string/integer issue in JS function AFMakeDate
Arithmetic is done with the parameter ‘year’, but the value being passed
is a string. Convert to an integer first.
Fred Ross-Perry [Mon, 26 Oct 2020 18:38:31 +0000 (11:38 -0700)]
add PDFPage.createSignature
remove cacheing of widgets in PDFPage.getWidgets
Paul Gardiner [Thu, 22 Oct 2020 13:51:20 +0000 (14:51 +0100)]
Generalise pdf_delete_annot to also remove widgets.
Sebastian Rasmussen [Fri, 23 Oct 2020 11:33:58 +0000 (19:33 +0800)]
jni: Fix typo in argument check.
Sebastian Rasmussen [Fri, 23 Oct 2020 09:26:30 +0000 (17:26 +0800)]
Avoid taking redundant annotation reference.
This showed up as a memory leak when opening a document,
creating a redaction, redacting the page, closing mupdf-gl
and discarding the changes to the PDF.
Sebastian Rasmussen [Wed, 21 Oct 2020 20:25:43 +0000 (04:25 +0800)]
When clearing signed signature, remove it from list.
The previous solution depended on marking signed signatures there
were cleared by removing their signer. After another round of code
reviewing it was revealed that cleared signatures can be removed
from the list of unsaved signatures in their entirety.
Sebastian Rasmussen [Tue, 20 Oct 2020 15:03:05 +0000 (17:03 +0200)]
Update parent object for linked objects when saving/repairing.
Not doing this causes a problem when saving a PDF where a single
signature has been signed more than once.
Before such a PDF is saved to file, each signature's signature
dictionary contains default values for the /ByteRange and /Contents.
Later when the file is saved to disk, first all objects are written to
file (including all signature dictionaries with default values for
/ByteRange and /Contents). Next complete_signatures() needs to update
those default values to the correct values: The /ByteRange value needs
to reflect the correct ranges of bytes used to compute the signature
digest, and the /Contents value must be updated to contain the
computed digest. To know at what file offsets to patch in these
updated values, complete_signatures() queries /ByteRange for its
parent object, expecting the object number of the signature
dictionary, and then queiries the xref for that object's file offset.
This file offset is used to looking for a PDF signature dictionary
that contains the /ByteRange and /Contents in need of patching.
complete_signatures() not patches /ByteRanges and /Contents in the
file, it also updates the in-memory signature dictionary PDF objects
containing the /ByteRange and /Contents. Updating a key-value pair in
a PDF dictionary will normally cause the value's parent object number
to be set to that of the dictionary containing the value. This doesn't
happen when complete_signatures() updates /ByteRange and /Contents.
The reason is that pdf_save_document() calls prepare_for_save() which
sets the flag save_in_progress on the document. This flag prevents,
e.g. pdf_dict_put() and friends from, setting the parent object number
of dictionary values when they are updated. When pdf_save_document()
later calls do_pdf_save_document() which calls complete_signatures()
it creates new PDF arrays and hexstrings their parent object number is
0. These are then used to update /ByteRange and /Contents in the
in-memory PDF dictionaries, but the value's parent object number
remains at 0.
When only saving a PDF with a single signed signature this is not a
problem, because the first time /ByteRange is queried for its parent
object number by complete_signature() it contains object number set
when the default value for /ByteRange was inserted into the dictionary
during signing of the signature.
When saving a PDF with a signature that has been signed more than once
there is a problem. As complete_signatures() is processing the first
signing of the signature it asks /ByteRange for its parent object
number, gets the object number of the signature dictionary, which in
the xref points to a proper file offset and the computed byte range
and signature digest can be patched into the signature dictionary's
/ByteRange and /Contents values in the file. As complete_signatures()
is processing the second signing of the same signature it again asks
/ByteRange for its parent object number, it unexpectedly gets 0 (since
the /ByteRange value was updated in-memory during the completion of
the first signature), the xref is then asked for the file position of
PDF object 0, which is located at file offset 0. complete_signatures()
then starts to look for a signature dictionary in need of patching at
file offset 0, but in the end errors out because it can't find the
signature dictionary.
This commit allows newly linked array and dictionary objects to have
their parent object numbers be updated even when a PDF file is being
saved (or repaired). This fixes the issue in the previous paragraph
by allowing /ByteRange's parent object number to be updated to that of
the signature dictionary containing it. This leads to
complete_signatures() being able to locate the signature dictionary's
file offset and patch its values.
Sebastian Rasmussen [Sun, 18 Oct 2020 19:57:44 +0000 (03:57 +0800)]
Update signature digest value in memory too.
Previously the signature digest would only be patched into a saved PDF
file by complete_sigantures(). After this commit the digest value is
also updated in the in-memory signature dictionary.
Sebastian Rasmussen [Sat, 17 Oct 2020 15:14:04 +0000 (23:14 +0800)]
Do not assume that the first unsaved signature is signed (it may be cleared).
Previously it was assumed that the first unsaved signature in an
incremental xref section necessarily would have its /ByteRange
and /Contents values updated. This is no longer true for cleared
signatures, and the first unsaved signature might be a cleared
signature.
Sebastian Rasmussen [Sat, 17 Oct 2020 07:28:40 +0000 (15:28 +0800)]
Avoid updating /ByteRange and /Contents of cleared signatures.
When clearing a signature field, remove its signature dictionary and its
signer. Later, when completing signatures, use the lack of a signer to avoid
updating the signatures dictionary's /ByteRange and /Contents values.
Updating those makes no sense since the pointer from the signature field
to its signature dictionary has been removed.
Previously the code tried to update the /ByteRange and /Contents
values for cleared signatures which caused problem fixed by this commit.
Sebastian Rasmussen [Thu, 15 Oct 2020 21:26:32 +0000 (05:26 +0800)]
Avoid shortening PDF object usage lists when saving.
Sebastian Rasmussen [Thu, 15 Oct 2020 21:01:54 +0000 (05:01 +0800)]
Return max xref length among current xref section and older.
Previously we would return the maximum xref length among
any xref sections, including ones appended after the
xref section pointed to by xref_base. This means that we
tried to write out objects for newer xref sections when
processing older xref sections, causing the xref_index
and PDF object usage lists to be corrupted.
Sebastian Rasmussen [Sat, 10 Oct 2020 09:35:35 +0000 (17:35 +0800)]
Fix printf conversion specification in debug print.
Tor Andersson [Fri, 9 Oct 2020 13:59:44 +0000 (15:59 +0200)]
mutool run: Add more signature related functions.
Tor Andersson [Fri, 9 Oct 2020 12:41:28 +0000 (14:41 +0200)]
mutool sign: Tweak output.
Tor Andersson [Fri, 9 Oct 2020 12:43:26 +0000 (14:43 +0200)]
mutool sign: Don't crash if designated name info can't be parsed.
Tor Andersson [Fri, 9 Oct 2020 12:15:13 +0000 (14:15 +0200)]
mutool sign: Always do incremental saves.
Tor Andersson [Thu, 8 Oct 2020 14:03:20 +0000 (16:03 +0200)]
mutool sign: Fix issues when listing unsigned signatures.
1) Fix recursion problem.
2) Don't try to parse certificate from unsigned signature.
3) Be more robust if the certificate is missing or blank.
Tor Andersson [Wed, 7 Oct 2020 10:28:11 +0000 (12:28 +0200)]
Parse entire XFA resource as one XML document.
Parsing each packet individually causes XML parsing errors.
Sebastian Rasmussen [Thu, 8 Oct 2020 19:41:51 +0000 (03:41 +0800)]
Fix memory leak of nested openssl BIO structures.
Sebastian Rasmussen [Thu, 8 Oct 2020 17:58:59 +0000 (01:58 +0800)]
Remember to expand use lists when adding xref stream object.
Sebastian Rasmussen [Thu, 8 Oct 2020 14:59:04 +0000 (22:59 +0800)]
Remember to drop locked fields.
Robin Watts [Thu, 8 Oct 2020 17:10:28 +0000 (18:10 +0100)]
Bug 702958: Fix overflow in fz_clear_pixmap_with_value.
Robin Watts [Thu, 8 Oct 2020 15:15:40 +0000 (16:15 +0100)]
Bug 701297: Harden populate_ui against unexpected repairs.
We count the number of layers, and allocate space for them in
an array. We then walk the tree reading details of those layers
in. If we hit a problem that causes a repair while reading the
information, the number of layers can magically increase. In
the existing code we run off the end of the array.
In the new code we watch for hitting the end of the array and
realloc as required.
Robin Watts [Fri, 9 Oct 2020 11:25:55 +0000 (12:25 +0100)]
Fix format specifier for printing xrefs in pdfocr device.
This was causing invalid xrefs to be written on Android.
Tor Andersson [Wed, 7 Oct 2020 10:27:44 +0000 (12:27 +0200)]
mutool run: Add functions to match Java API.
Robin Watts [Wed, 7 Oct 2020 10:12:41 +0000 (11:12 +0100)]
Add pdf_was_repaired() and java reflection.
Tor Andersson [Mon, 5 Oct 2020 10:28:22 +0000 (12:28 +0200)]
Fix pdf_sign_signature marking signed signature as needing new AP.
When we call pdf_update_signature_appearance we should make sure to
clear the 'needs_new_ap' flag.
Robin Watts [Fri, 2 Oct 2020 11:04:20 +0000 (12:04 +0100)]
Ensure that pdf_sign_signature dirties document.
pdf_clear_signature, similarly.
Robin Watts [Fri, 25 Sep 2020 16:18:24 +0000 (17:18 +0100)]
Bug 702522: Add resolution to output PNG files.
Robin Watts [Tue, 29 Sep 2020 13:45:42 +0000 (14:45 +0100)]
Fix rendering of "stroked" type3 glyphs.
As seen with fts_23_2312.pdf from the PDF 2.0 FTS.
This file uses "2 Tr" (Fill and Stroke text rendering mode) to
render a type 3 glyph. The fill part renders the glyph to a pixmap
that goes into the cache. The stroke part then finds the same glyph
and renders that too.
The difference is that the fill code in the draw device understands
how to draw from pixmaps, where the stroke code does not. Fix that
difference here.
Robin Watts [Fri, 2 Oct 2020 10:09:40 +0000 (11:09 +0100)]
Expose pdf_clear_signature as PDFWidget.clearSignature for java.
Robin Watts [Thu, 1 Oct 2020 17:26:33 +0000 (18:26 +0100)]
MSVC: Fix libthirdparty x64 builds
These were failing because I'd forgotten to exclude the individual
files for mujs.
Tor Andersson [Mon, 28 Sep 2020 15:09:07 +0000 (17:09 +0200)]
Update MuJS submodule to version 1.0.9.
Robin Watts [Mon, 28 Sep 2020 11:43:30 +0000 (04:43 -0700)]
MSVC: Tweak tesseract/leptonica projects
These should now build properly in the absence of the source.
Tor Andersson [Wed, 23 Sep 2020 13:24:22 +0000 (15:24 +0200)]
Bump version number.
Robin Watts [Fri, 25 Sep 2020 14:20:13 +0000 (15:20 +0100)]
Bug 702543: Avoid rendering file attachment annotations when Printing.
Robin Watts [Fri, 25 Sep 2020 12:19:48 +0000 (13:19 +0100)]
Bug 702857: Detect/avoid overflow when calculating sizes of pixmaps.
Throw an error when trying to allocate an overly large pixmap.
Robin Watts [Fri, 25 Sep 2020 12:14:10 +0000 (13:14 +0100)]
Improve error handling in muconvert.
Sebastian Rasmussen [Fri, 25 Sep 2020 11:31:11 +0000 (19:31 +0800)]
jni: Fix compilation errors for Android.
Commit
3bd8ce45a9a29c8131deab37df17c24b1ece162b omitted
specifying the correct jni_throw_*() macro in two places.
This commit fixes that.
Tor Andersson [Mon, 21 Sep 2020 12:12:36 +0000 (14:12 +0200)]
Update CHANGES.
Robin Watts [Fri, 4 Sep 2020 14:21:02 +0000 (15:21 +0100)]
Bug 701304: Improve bounds checking in jpx_read_image.
Robin Watts [Thu, 24 Sep 2020 15:30:45 +0000 (16:30 +0100)]
Bug 702566: Avoid leaking run_obj from pdf_add_cid_font_widths
When we hit curr_code == face->num_glyphs we should publish any
run_obj we have (and certainly drop it).
Robin Watts [Thu, 24 Sep 2020 16:06:21 +0000 (17:06 +0100)]
Bug 702936: Avoid NULL-deref in xfa locked fields code.
If 'use' is NULL, then just give up, cos clearly we'll never
match with it.
Robin Watts [Thu, 24 Sep 2020 15:57:37 +0000 (16:57 +0100)]
Bug 702715: Fix layout problems with mutool -s.
We weren't flushing text on a T*. Do so.
Robin Watts [Thu, 24 Sep 2020 14:51:42 +0000 (15:51 +0100)]
Bug 702865: Don't walk through successive pages while linearising.
When preparing a document for linearisation, we walk all the sub
objects to mark those as being used by a given page.
Unfortunately, when we walk annotations, these can have 'Dest'
references that are other pages. The current code will attempt
to walk those too. This means we can recurse a very long way,
causing use to overflow the exception stack.
To avoid this we avoid stepping through references that take us
either to the Page tree or to other pages.
Robin Watts [Tue, 22 Sep 2020 13:08:03 +0000 (14:08 +0100)]
Add pdf_graft_mapped_page and pdf_graft_page functions.
The implementation is largely copied from pdfmerge.c, but should not
affect the source document any more.
Update mutool merge to use the new function. Also tweak error handling
slightly to avoid throwing without a catcher.
Expose new functions through JNI.
Update mutool run to Add PDFGraftMap.graftPage and
PDFDocument.graftPage.
map.graftPage(at, srcDoc, srcPage)
doc.graftPage(at, srcDoc, srcPage)
(This commit includes code from Tor).
Robin Watts [Wed, 23 Sep 2020 12:38:19 +0000 (05:38 -0700)]
Ensure libmupdf.jar gets correct path to class files.
Robin Watts [Tue, 22 Sep 2020 10:47:36 +0000 (11:47 +0100)]
Add some consts to various fz_pixmap functions.
Robin Watts [Tue, 15 Sep 2020 15:40:39 +0000 (16:40 +0100)]
Add some consts in the pixmap conversion functions.
Robin Watts [Tue, 22 Sep 2020 16:34:31 +0000 (17:34 +0100)]
Avoid warning in parse_declaration_list.
By initing variables differently, we can avoid the "tail might be
used unitialised" warning.
Robin Watts [Tue, 22 Sep 2020 19:42:28 +0000 (20:42 +0100)]
MSVC: Add mujs source files to project.
Exclude them from the build as they are built as part of one.c,
but this way they can be searched from the IDE.
Robin Watts [Tue, 22 Sep 2020 19:04:05 +0000 (12:04 -0700)]
Fix warning from linux java build.
Robin Watts [Tue, 22 Sep 2020 18:49:18 +0000 (19:49 +0100)]
Fix a couple of warnings in Java build.
Robin Watts [Tue, 22 Sep 2020 17:59:30 +0000 (18:59 +0100)]
MSVC Solution: Add missing files to javaviewerlib project.
Makes no difference, except for search/replace.
Robin Watts [Tue, 22 Sep 2020 16:44:30 +0000 (17:44 +0100)]
Add java-clean target to the toplevel makefile.
Also make sure that java-clean, actually cleans the java build.
Sebastian Rasmussen [Tue, 22 Sep 2020 15:21:08 +0000 (23:21 +0800)]
java: Enable pedantic compilation warnings.
Had this been enabled before gcc would have complained about
functions returning void, returning the void value returned by
jni_rethrow(),
Robin Watts [Tue, 22 Sep 2020 18:40:23 +0000 (19:40 +0100)]
Wrap jni_rethrow() and family in macros.
Commit
c51cc4c3da519ffdf0fa43d680518ab995332e8b started to
return from JNI functions using comma expressions. Unfortunately
this also meant returning the void return value from jni_rethrow()
in JNI function returning void. Neither gcc nor clang complained
about this (with our normal set of warnings), but MSVC caught it.
Accordingly, we move to using macros for jni_rethrow() and similar
jni_throwing "functions". These wrap up the rethrow and the return
into a single invocation. The values we return here are never
important because the caller should spot that we have raised an
exception before it takes notice of the value we pass back.
Thus, we can have jni_throw_whatever() always end with a return 0,
which will work, whether it's an int, a long, or a pointer expected
as the return value. To cope with throwing in void contexts, however,
we need to also have jni_throw_whatever_void();
Sebastian Rasmussen [Tue, 22 Sep 2020 14:07:11 +0000 (22:07 +0800)]
java: Renumber and add missing constants, fixing java build.
Commit
02027e762a8f42d71f82665ebd84af4857e3ff93 accidentally
forgot to update the corresponding java enumerations.
Paul Gardiner [Mon, 21 Sep 2020 11:14:37 +0000 (12:14 +0100)]
Allow extra compile flags specific to C++.
This introduces the XCCXXFLAGS define, which gets included as flags
to all C++ compilations. The current planned use it to add -std=c++11
to the ios build to make tesseract-related code compile.
Tor Andersson [Mon, 14 Sep 2020 14:02:31 +0000 (16:02 +0200)]
Bug 702899: Fix off-by-one error in accelerate_chapter.
Tor Andersson [Thu, 17 Sep 2020 12:10:17 +0000 (14:10 +0200)]
Preserve error message if PDF document fails to open.
fz_drop_document clobbers the previous error message, since it uses
fz_try internally to swallow possible cleanup errors.
Tor Andersson [Thu, 17 Sep 2020 12:32:55 +0000 (14:32 +0200)]
wasm: Always call freeDocument before opening a new file.
If fetch() throws an error, we don't want the old document lying around.
Tor Andersson [Thu, 17 Sep 2020 11:34:11 +0000 (13:34 +0200)]
wasm: Rename rethrow() to wasm_rethrow() for clarity.
Tor Andersson [Thu, 17 Sep 2020 09:18:05 +0000 (11:18 +0200)]
wasm: Remove unused drawPageAsSVG function.
Tor Andersson [Wed, 16 Sep 2020 09:56:34 +0000 (11:56 +0200)]
wasm: Call mupdf.oninit() callback instead of main().
Tor Andersson [Thu, 17 Sep 2020 13:01:44 +0000 (15:01 +0200)]
wasm: Search text in document.
Update search results on visible pages while typing.
Click the next/prev buttons to find the next page with a match.
Tor Andersson [Thu, 10 Sep 2020 13:18:55 +0000 (15:18 +0200)]
wasm: Clean up HTML and CSS layout.
Don't use CSS grid layout.
We need the page list to be part of the document scrolling for history
navigation to work automatically.
Use brighter more cheerful colors.
Tor Andersson [Tue, 11 Aug 2020 12:16:10 +0000 (14:16 +0200)]
wasm: Add error checking and convert mupdf to javascript exceptions.
Tor Andersson [Mon, 10 Aug 2020 15:40:56 +0000 (17:40 +0200)]
wasm: Use ArrayBuffer and Blob to set image data faster.
ArrayBuffers can transfer between Worker and main thread without copying,
and avoiding the BASE64 encoding and stringification step means we can
more or less get the raw PNG data directly to the browser engine with as
few intermediate steps as possible.
Tor Andersson [Thu, 10 Sep 2020 13:06:03 +0000 (15:06 +0200)]
wasm: Use structured text to create selectable invisible text layer.
Tor Andersson [Fri, 7 Aug 2020 16:10:26 +0000 (18:10 +0200)]
wasm: Use JSON to return page links.
Avoid returning hard-wired HTML strings from the C code.
Generate the HTML from the JSON in the viewer code for more flexibility.
Tor Andersson [Thu, 10 Sep 2020 13:30:55 +0000 (15:30 +0200)]
wasm: Add async mupdf library and improve viewer demo.
Tor Andersson [Thu, 6 Aug 2020 14:22:47 +0000 (16:22 +0200)]
wasm: Remove obsolete demos and update Makefile.
Tor Andersson [Thu, 10 Sep 2020 13:05:20 +0000 (15:05 +0200)]
stext: Add JSON stext output format and add preserve-spans option.
Robin Watts [Mon, 14 Sep 2020 11:03:44 +0000 (12:03 +0100)]
MSVC: Hide harfbuzz warnings in all configurations.
Robin Watts [Fri, 11 Sep 2020 11:38:25 +0000 (12:38 +0100)]
mupdf-gl: Fix warnings in MSVC.
Robin Watts [Fri, 11 Sep 2020 10:53:07 +0000 (11:53 +0100)]
Add fz_warp_pixmap function.
Robin Watts [Fri, 11 Sep 2020 13:24:49 +0000 (14:24 +0100)]
MSVC Solution tweaks.
Avoid "/Gm is deprecated" warnings.
Fix Memento x64 builds.
Robin Watts [Fri, 11 Sep 2020 11:41:29 +0000 (12:41 +0100)]
Various size_t fixes for MSVC.
Tor Andersson [Tue, 11 Aug 2020 15:35:25 +0000 (17:35 +0200)]
Update CMap resources.
Tor Andersson [Fri, 4 Sep 2020 10:37:51 +0000 (12:37 +0200)]
Add docs/ecosystem.html and diagram.
Tor Andersson [Thu, 3 Sep 2020 11:56:18 +0000 (13:56 +0200)]
Add "redact" mode side panel that opens with shift-R.
Tor Andersson [Fri, 24 Apr 2020 13:16:07 +0000 (15:16 +0200)]
html: Insert <br> as flow nodes.
This fixes several issues with <br> tags interacting
badly with css margins and selectors due to how we were
splitting blocks in order to insert the new-lines from <br>.
This fixes bugs 698351 and 702856.
Julian Smith [Mon, 31 Aug 2020 15:29:34 +0000 (16:29 +0100)]
Moved test code from scripts/mutool.py into scripts/mupdfwrap.py.
Tor Andersson [Fri, 4 Sep 2020 17:13:05 +0000 (19:13 +0200)]
Remove unused submodule from gumbo-parser submodule.
Robin Watts [Thu, 3 Sep 2020 13:22:46 +0000 (14:22 +0100)]
Bug 702537: Avoid use-after-realloc in pattern handling.
The gstates are held in an array. This array can be realloced
while processing nested patterns, invalidating the current pointer.
Avoid this by reloading the pointer each time around the loop.
Robin Watts [Wed, 2 Sep 2020 18:46:27 +0000 (19:46 +0100)]
Bug 702527: Cope with nonseparable nonisolated blends of alpha only groups.
Robin Watts [Wed, 2 Sep 2020 18:16:17 +0000 (19:16 +0100)]
Bug 702524: Fix overread in nonseparable gray blending.
Don't read bp[n] if there is no alpha.
Robin Watts [Wed, 2 Sep 2020 16:29:09 +0000 (17:29 +0100)]
Bug 701180: Fix memory overwrite.
Templated function was overrunning buffer in the "no destination
alpha" case by stepping too many bytes.
Robin Watts [Tue, 1 Sep 2020 15:23:46 +0000 (16:23 +0100)]
mupdf-gl: Add "Mark for redaction" button.
Add a button to allow all the current search hits to be added
as redaction annotations.