Skip to content

mupdf: update to 1.25.4#2034

Merged
Frenzie merged 1 commit into
koreader:masterfrom
benoit-pierre:pr/mupdf_update
Feb 19, 2025
Merged

mupdf: update to 1.25.4#2034
Frenzie merged 1 commit into
koreader:masterfrom
benoit-pierre:pr/mupdf_update

Conversation

@benoit-pierre

@benoit-pierre benoit-pierre commented Feb 19, 2025

Copy link
Copy Markdown
Member

@poire-z

poire-z commented Feb 19, 2025

Copy link
Copy Markdown
Contributor

Not sure what this is about, why these are shown in the github diff ?:
image

@benoit-pierre

Copy link
Copy Markdown
Member Author

Those files were updated (some annotation tests check the resulting PDF file hash against the corresponding file in spec/unit/data).

@Frenzie

Frenzie commented Feb 19, 2025

Copy link
Copy Markdown
Member

It's a bit surprising that they're different yet still the exact same size.

@benoit-pierre

Copy link
Copy Markdown
Member Author
▸ for f in spec/unit/data/simple-out{,-annotated,-annotation-deleted}.pdf; do \
  diff -u \
    --label=a/$f <(git sh @~:$f | xxd) \
    --label=b/$f <(git sh @:$f | xxd); \
done
--- a/spec/unit/data/simple-out.pdf
+++ b/spec/unit/data/simple-out.pdf
@@ -346,7 +346,7 @@
 00001590: 312e 3838 3938 5d2f 4341 202e 353e 3e0a  1.8898]/CA .5>>.
 000015a0: 656e 646f 626a 0a0a 7872 6566 0a30 2031  endobj..xref.0 1
 000015b0: 350a 3030 3030 3030 3030 3030 2036 3535  5.0000000000 655
-000015c0: 3336 2066 200a 3030 3030 3030 3030 3136  36 f .0000000016
+000015c0: 3335 2066 200a 3030 3030 3030 3030 3136  35 f .0000000016
 000015d0: 2030 3030 3030 206e 200a 3030 3030 3030   00000 n .000000
 000015e0: 3030 3638 2030 3030 3030 206e 200a 3030  0068 00000 n .00
 000015f0: 3030 3030 3031 3431 2030 3030 3030 206e  00000141 00000 n
--- a/spec/unit/data/simple-out-annotated.pdf
+++ b/spec/unit/data/simple-out-annotated.pdf
@@ -347,7 +347,7 @@
 000015a0: 6e74 656e 7473 2861 6e6e 6f74 6174 696f  ntents(annotatio
 000015b0: 6e20 636f 6e74 656e 7473 293e 3e0a 656e  n contents)>>.en
 000015c0: 646f 626a 0a0a 7872 6566 0a30 2031 350a  dobj..xref.0 15.
-000015d0: 3030 3030 3030 3030 3030 2030 3030 3031  0000000000 00001
+000015d0: 3030 3030 3030 3030 3030 2036 3535 3335  0000000000 65535
 000015e0: 2066 200a 3030 3030 3030 3030 3136 2030   f .0000000016 0
 000015f0: 3030 3030 206e 200a 3030 3030 3030 3030  0000 n .00000000
 00001600: 3638 2030 3030 3030 206e 200a 3030 3030  68 00000 n .0000
--- a/spec/unit/data/simple-out-annotation-deleted.pdf
+++ b/spec/unit/data/simple-out-annotation-deleted.pdf
@@ -345,7 +345,7 @@
 00001580: 2e38 3839 3820 3020 3834 312e 3838 3938  .8898 0 841.8898
 00001590: 5d2f 4341 202e 353e 3e0a 656e 646f 626a  ]/CA .5>>.endobj
 000015a0: 0a0a 7872 6566 0a30 2031 350a 3030 3030  ..xref.0 15.0000
-000015b0: 3030 3030 3030 2036 3535 3336 2066 200a  000000 65536 f .
+000015b0: 3030 3030 3030 2036 3535 3335 2066 200a  000000 65535 f .
 000015c0: 3030 3030 3030 3030 3136 2030 3030 3030  0000000016 00000
 000015d0: 206e 200a 3030 3030 3030 3030 3638 2030   n .0000000068 0
 000015e0: 3030 3030 206e 200a 3030 3030 3030 3031  0000 n .00000001

@Frenzie

Frenzie commented Feb 19, 2025

Copy link
Copy Markdown
Member

Haha yes, of course. I'd just have expected there to also be a couple more or fewer bytes. :-)

@Frenzie Frenzie merged commit 4281e9b into koreader:master Feb 19, 2025
@benoit-pierre

Copy link
Copy Markdown
Member Author

It's this change:

commit c8ebc2232494ed75abd129b55299ae47be0f28a2
Author: Robin Watts <Robin.Watts@artifex.com>
Date:   Mon Dec 23 00:07:41 2024 +0000

    Bug 708211: Mutool clean produces object 0 with invalid gen num.
    
    The spec says it should always be 65535, but we're updating it...
---
 source/pdf/pdf-write.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/source/pdf/pdf-write.c b/source/pdf/pdf-write.c
index e471a16a..4cbe7f22 100644
--- a/source/pdf/pdf-write.c
+++ b/source/pdf/pdf-write.c
@@ -3919,6 +3919,7 @@ do_pdf_save_document(fz_context *ctx, pdf_document *doc, pdf_write_state *opts,
 					lastfree = num;
 				}
 			}
+			opts->gen_list[0] = 0xffff;
 
 			if (opts->do_linear && opts->page_count > 0)
 			{

@benoit-pierre benoit-pierre deleted the pr/mupdf_update branch February 19, 2025 22:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants