Commit Graph
420 Commits
Author SHA1 Message Date
mtlcl410 8d9f8d5f30 M5: a reply is not drawn on the page or flattened into it (comment.reply) (#5632) 2026-11-09 18:15:44 +08:00
mtlcl410 9e29af7849 fix(render): a stream ending in endstrea is not read into a later object's stream (hayro-syntax patch 36) (#6669) 2026-11-09 18:03:41 +08:00
BFlat cde331fb7e Merge pull request #6663 from storytold/merge/render-interpret-patches
Land render and font patches (#6292, #6287, #6314, #6353, #6359, #6368, #6409, #6491, #6545, #6516, #6521, #6528, #6533, #6529, #6542, #6543, #6569, #6572)
2026-11-09 10:54:50 +08:00
Luigi Pinna 8c7ea6377e test(content): the #2456 tests use a filtered inline image (#2483) 2026-11-09 10:13:54 +08:00
MarekSpodBiedry 344ba9f8d7 Refuse a legacy encryption key length above 128 bits instead of panicking (#1769) (#1882) 2026-11-09 10:13:00 +08:00
jonathanwxh-cell 5e671ec301 fix(render): treat combined fill-and-stroke operators as a knockout group (#3229) (#4788) 2026-11-09 10:09:06 +08:00
bflatastic b21ee3a710 Decode a soft mask that isn't averaged down within its image's decode
Patch 82 sent every soft mask through the decoded-image cache, so a mask that patch 91 keeps failed inside its image's entry got a second entry and counted as another decode. Only a mask averaged down needs an entry of its own; any other decodes as it did before patch 82.
2026-11-09 09:05:11 +07:00
bflatastic 9e6854869b Merge origin/main into merge/render-interpret-patches
# Conflicts:
#	crates/render/src/raster/tests.rs
#	crates/render/src/text/tests.rs
#	parity/acrobat-features.toml
#	vendor/README.md
2026-11-09 09:03:56 +07:00
bflatastic e49055053f Give the Type 3 widths warning a flag in the decoded image cache's warning set
Patch 90 adds InterpreterWarning::Type3WidthsMissing and patch 91 matches every warning to a flag, so the merged match needs the new variant.
2026-11-09 08:15:43 +07:00
bflatastic d2619333e9 Merge #6438: M2: a page past the rasterizer's coverage renders what fitted instead of failing (view.render-error-isolation)
# Conflicts:
#	vendor/README.md
2026-11-09 08:15:14 +07:00
bflatastic 795f9a9508 Merge #6532: M2: a CMap's bfchar mappings read codes at their codespace length (view.render-cid-fonts)
# Conflicts:
#	crates/render/src/raster/tests.rs
#	vendor/README.md
2026-11-09 08:14:19 +07:00
bflatastic e2f65dbf5a Merge #6572: M3: Find matches words on a vertical line (view.find)
# Conflicts:
#	vendor/README.md
2026-11-09 08:13:59 +07:00
bflatastic 8eb14f3892 Merge #6569: fix(render): a symbolic TrueType font in the Macintosh glyph order reads its codes as Mac Roman (hayro-interpret patch 101)
# Conflicts:
#	crates/render/src/raster/tests.rs
#	vendor/README.md
2026-11-09 08:13:36 +07:00
bflatastic d5ea69db50 Merge #6348: fix(render): a ToUnicode CMap reads its mappings past a token it can't parse (hayro-cmap patch 3)
# Conflicts:
#	crates/render/src/raster/tests.rs
#	vendor/README.md
2026-11-09 08:13:19 +07:00
bflatastic 5da76a640c Merge #6543: fix(render): a numbered glyph name at its own code reads as that code's character (hayro-interpret patch 100)
# Conflicts:
#	vendor/README.md
#	vendor/hayro-interpret/src/font/mod.rs
#	vendor/hayro-interpret/src/font/type3.rs
2026-11-09 08:13:01 +07:00
bflatastic 2992146abb Merge #6312: M1: a document that encrypts only its embedded files opens without a password (core.attachment-only-encryption)
# Conflicts:
#	crates/render/src/inspect/tests.rs
#	vendor/README.md
2026-11-09 08:12:28 +07:00
bflatastic e70cacf36f Merge #6290: fix(render): a stream with no endstream after it draws from its /Length instead of a blank page (hayro-syntax patch 36)
# Conflicts:
#	crates/render/src/raster/tests.rs
#	vendor/README.md
2026-11-09 08:11:43 +07:00
bflatastic ec0330ea77 Merge #6542: fix(render): a patch mesh painted through a path its own size draws every patch (hayro-interpret patch 99)
# Conflicts:
#	vendor/README.md
2026-11-09 08:11:40 +07:00
bflatastic 183c66ddb5 Merge #6529: fix(render): a non-embedded SymbolMT draws Symbol's glyphs, whatever encoding it declares (hayro-interpret patch 98)
# Conflicts:
#	vendor/README.md
2026-11-09 08:11:26 +07:00
bflatastic 6160819a57 Merge #6533: M2: a font without a /Subtype is drawn by its /BaseFont (view.render-pages)
# Conflicts:
#	vendor/README.md
2026-11-09 08:11:11 +07:00
bflatastic 9e2c8130ad Merge #6561: M1: a file whose last update has no /Prev opens with all its pages and a repair note (core.repair-broken-files)
# Conflicts:
#	parity/acrobat-features.toml
#	vendor/README.md
#	vendor/hayro-syntax/src/pdf.rs
2026-11-09 08:11:01 +07:00
bflatastic e2502b2f9b Merge #6528: fix(render): a CID-keyed CFF font with an emptied font dict still draws its other glyphs (hayro-interpret patch 93)
# Conflicts:
#	vendor/README.md
2026-11-09 08:10:53 +07:00
bflatastic e4cb041bdc Merge #6521: fix(render): glyph names read as text only in the glyph list's uni and u forms (hayro-interpret patch 92)
# Conflicts:
#	vendor/README.md
2026-11-09 08:10:37 +07:00
bflatastic 4dfd9bd564 Merge #6516: fix(render): a picture that doesn't decode is decoded once, not at every draw (hayro-interpret patch 91)
# Conflicts:
#	crates/render/src/raster/tests.rs
#	vendor/README.md
#	vendor/hayro-interpret/src/x_object.rs
2026-11-09 08:10:02 +07:00
bflatastic 574968a03b Merge #6545: fix(render): a Type 3 font without /Widths advances by its glyphs' d0/d1 widths, and the page warns about it (hayro-interpret patch 90)
# Conflicts:
#	crates/render/src/raster/tests.rs
#	vendor/README.md
#	vendor/hayro-interpret/src/font/type3.rs
2026-11-09 08:08:39 +07:00
bflatastic 4c219bb055 Merge #6491: fix(render): a non-embedded Times New Roman draws the glyphs its codes name (hayro-interpret patch 88)
# Conflicts:
#	crates/render/src/raster/tests.rs
#	vendor/README.md
2026-11-09 08:07:55 +07:00
bflatastic 16312e1a10 Merge #6534: M2: a page without a /MediaBox is US Letter (view.render-pages)
# Conflicts:
#	vendor/README.md
#	vendor/hayro-syntax/src/page.rs
2026-11-09 08:07:49 +07:00
bflatastic e81b45a117 Merge #6409: fix(render): a Type 3 glyph shown again isn't decoded again (hayro-interpret patch 87)
# Conflicts:
#	vendor/README.md
2026-11-09 08:07:12 +07:00
bflatastic c90a4115d5 Merge #6368: fix(render): a form field's widget is drawn above the page's comments (hayro-interpret patch 86)
# Conflicts:
#	vendor/README.md
2026-11-09 08:06:57 +07:00
bflatastic cdf7f1b178 Merge #6359: fix(render): a ToUnicode written with CID ranges gives its text (hayro-interpret patch 85)
# Conflicts:
#	crates/render/src/text/tests.rs
#	vendor/README.md
#	vendor/hayro-interpret/src/font/cid.rs
2026-11-09 08:06:43 +07:00
bflatastic 9cb7dc4094 Merge #6510: M1: the renderer reads a cut-off last update's objects, as the document model does (core.repair-broken-files)
# Conflicts:
#	vendor/README.md
2026-11-09 08:05:56 +07:00
bflatastic e7ecc84544 Merge #6506: fix(render): a fax image with more /Rows than its /Height is decoded to its height (hayro-syntax patch 41)
# Conflicts:
#	vendor/README.md
2026-11-09 08:05:40 +07:00
bflatastic 5c42721193 Merge #6501: fix(render): an image whose PNG predictor was declared but never applied draws its samples (hayro-syntax patch 40)
# Conflicts:
#	parity/acrobat-features.toml
#	vendor/README.md
2026-11-09 08:05:23 +07:00
bflatastic 67c1e6a145 Merge #6353: fix(render): an embedded CJK font without a usable ToUnicode reads its text through its collection's UCS2 CMap (hayro-interpret patch 84)
# Conflicts:
#	vendor/README.md
2026-11-09 08:05:10 +07:00
bflatastic d568f0d3d6 Merge #6314: fix(render): a TrueType font marked with an out-of-range loca format draws its letters instead of boxes (hayro-interpret patch 83)
# Conflicts:
#	vendor/README.md
2026-11-09 08:04:53 +07:00
bflatastic 581b5364ec Merge #6287: fix(render): a small image with a soft mask far larger than it draws in seconds, its mask averaged down once (hayro-interpret patch 82)
# Conflicts:
#	vendor/README.md
2026-11-09 08:04:38 +07:00
bflatastic 9d8e21de25 Merge #6355: fix(render): a page whose MediaBox or CropBox encloses no area shows its content (hayro-syntax patch 38)
# Conflicts:
#	vendor/README.md
2026-11-09 08:04:18 +07:00
bflatastic 88edc03ef4 Merge #6292: fix(render): a page of stencil masks painted with a tiling pattern draws in seconds instead of running out of memory (hayro patch 30)
# Conflicts:
#	vendor/README.md
2026-11-09 08:04:05 +07:00
mtlcl410 58c30af312 fix(render): a JBIG2 scan whose data starts with a JBIG2 file header draws instead of a white page (hayro-jbig2 patch 17) (#6279) 2026-11-09 08:54:03 +08:00
c02341f6c0 M2: a wide stroke of a path with y curves is drawn, not dropped (vello_common patch 4) (#6526)
A cubic whose second control point is its end point (as the `y` operator builds,
ISO 32000-2 8.5.2.1 Table 58) has a zero derivative at its end. kurbo 0.13.1's
offset curve looks for cusps with a root search on the curvature, which grows
without bound towards that end; at some widths the search stops on the end point
and normalising the zero tangent there gives NaN. vello_common's fill drops any
outline with NaN, so the whole stroke vanished (a two-curve `y` path drew nothing
at 16, 32 and 63 pt; a PDFBox tracker file lost its 32 pt "XX" outline).

The NaN fallback that #4913 added to `flatten::stroke` now also moves such a
control point the stroke tolerance towards the previous control point before
stroking again (the curve moves by at most 4/9 of the tolerance). Outlines that
come back finite take the old path unchanged. The vendor ledger row also gets
back #4913's entry, which a merge had dropped.


Claude-Session: https://claude.ai/code/session_01Pq7HyCHD1R3rywQBPCHXZA

Co-authored-by: mtlcl410 <chuanlin@niar.org.tw>
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-09 08:31:00 +08:00
42b21e5362 fix(render): a form XObject that draws itself is drawn once (hayro-interpret patch 89) (#6515)
* M2: a form XObject that draws itself is drawn once (hayro-interpret patch 89)

A form whose content names itself, directly or through another form, a
pattern or a glyph, drew itself again at every level until the page's
nested-paint budget (50,000) ran out. PDFBOX-5782's poppler-748 page 2,
whose form names a /Pages dictionary as /X0 and so finds itself in the
page's resources, took 38 s.

hayro-interpret now keeps the forms being drawn on the context and skips
a form already on it, reporting ContentTruncated (ISO 32000-2 §8.10.1: a
form is a self-contained description). The lenient fallback from a form's
own resources to the page's stays: MuPDF, Poppler and PDFium all draw a
name from the page's resources when the form's /Resources has no
XObject subdictionary (MuPDF and Poppler also when it has an empty one).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Pq7HyDBXygTf7jcqdsjcfn

* fix(render): a form that reaches itself through a pattern or a glyph is drawn once (hayro-interpret patch 89)

The forms being drawn are now kept per page and thread rather than per
context, so the tiling patterns, Type 3 glyphs, soft masks and groups
painted inside a form, which hayro interprets in contexts of their own,
see that the form is being drawn and skip it inside themselves. A form
drawn again after it has finished draws as before.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Pq7HyCHD1R3rywQBPCHXZA

* chore: re-run CI after the Fill & Sign save comparison failed on the clock (#6066)

`fill_sign_enter_adds_lines_outside_click_commits_and_escape_cancels`
compares two saves whose /ModDate fell in different seconds; it passes
locally on this commit. No change.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Pq7HyCHD1R3rywQBPCHXZA

---------

Co-authored-by: mtlcl410 <chuanlin@niar.org.tw>
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-09 08:30:14 +08:00
9b231f241d perf(render): undo TIFF predictor 2 a byte row at a time at 8 and 16 bits (#6505)
TIFF predictor 2 (ISO 32000-2 §7.4.4.4, Table 10) went through the
bit-level BitChunks/BitWriter path for every bit depth, re-reading the
previous output pixel through a new BitReader per pixel. Whole-byte
samples (8 and 16 bits per component) are now undone on byte slices,
each sample added to the same component of the pixel to its left,
wrapping at its width; 1-, 2- and 4-bit samples keep the bit-level path.
The output is byte-identical, including the dropped partial last row.

A page of 45 full-page 8-bit grey images so predicted (PDFBOX-1350)
renders in about 4 s instead of 23 s with the same pixels.

Vendored hayro-syntax patch 42.


Claude-Session: https://claude.ai/code/session_01Pq7HyDBXygTf7jcqdsjcfn

Co-authored-by: mtlcl410 <chuanlin@niar.org.tw>
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-09 08:29:44 +08:00
mtlcl410andClaude Opus 5.5 8c892e6529 M3: a numbered-name counter that starts below 32 is not read as codes (create.text-extraction)
A subset that counts its glyphs in order of first use (`/Differences [1 /C1
/C2 ...]`) names its own codes, so numbered_names_name_their_codes held and
`/C65` (the 65th glyph used) read as `A`. A numbered name at a C0 control
code, which no text shows, now gives the counter away and the font reads
nothing. The check sits in the one function both the Type 1/CFF and the
Type 3 paths call.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Pq7HyCHD1R3rywQBPCHXZA
2026-11-09 07:23:00 +08:00
mtlcl410andClaude Opus 5.5 4279595c4c fix(render): Type3Glyph::as_unicode documents its fallbacks, OutlineGlyph::as_unicode points to Glyph::as_unicode (hayro-interpret patch 100)
Documentation only.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Pq7HyCHD1R3rywQBPCHXZA
2026-11-08 20:21:01 +08:00
mtlcl410andClaude Opus 5.5 9b470180ab M1: the delimiter test rewrites only the cut-off update, and a comment after obj is tested to end the keyword (core.repair-broken-files)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Pq7HyCHD1R3rywQBPCHXZA
2026-11-08 16:29:58 +08:00
mtlcl410andClaude Opus 5.5 577842d494 M1: an object header needs an object number that fits 32 bits, and the trailing-data test names where renderer and model differ (core.repair-broken-files)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Pq7HyCHD1R3rywQBPCHXZA
2026-11-08 14:50:25 +08:00
mtlcl410andClaude Opus 5.5 0b0219d966 M1: an object header needs a token boundary after obj, as the document model reads one (core.repair-broken-files)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Pq7HyCHD1R3rywQBPCHXZA
2026-11-08 14:33:28 +08:00
mtlcl410andClaude Opus 5.5 93a8233b22 M3: the Mac OS Roman reading is decided once per font and stays off for a base encoding name the renderer doesn't know (hayro-interpret patch 101)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Pq7HyCHD1R3rywQBPCHXZA
2026-11-08 14:24:52 +08:00
mtlcl410andClaude Opus 5.5 b0eb080434 M1: the Type 3 Unicode fallbacks are documented on Glyph::as_unicode and Type3Glyph::as_unicode (create.text-extraction)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Pq7HyCHD1R3rywQBPCHXZA
2026-11-08 14:20:52 +08:00
mtlcl410andClaude Opus 5.5 66763378aa M1: a rebuild whose trailer lacks the encryption dictionary is not taken, tested (core.repair-broken-files)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Pq7HyCHD1R3rywQBPCHXZA
2026-11-08 14:12:50 +08:00