Commit Graph

253 Commits

Author SHA1 Message Date
Dylan M. Taylor 8ee1ac0c58 Merge pull request #4117 from aiongg/fix/coderabbit-b-caps
fix(limits): bound the decoding and listing work that repeated references and small inputs multiply
2026-10-22 21:38:59 -04:00
aiongg 4362449fb2 fix(render): find an embedded file by key without the listing's budget
Extraction walked the name tree again with a fresh key budget, so keys
the listing had left out could fill it and a listed embedded file came
back as not found. The lookup compares each key with the one wanted and
keeps none, so it needs no budget; a key object or /Names array that
several places reference is converted once.
2026-10-22 23:32:42 +00:00
aiongg 8bcf83faef fix(render): spend the raw length of text that converts shorter
A kept web address or attachment text spent only its converted length,
so a long raw value that trimmed short was converted in full for every
entry sharing it. A kept conversion now spends the longer of its raw
and converted lengths.
2026-10-22 23:31:43 +00:00
aiongg 7a73c2ec3a fix(render): keep embedded-file keys within the text budget
The embedded-files name tree copied every key, and an attachment
without a file name copied its key again as the name, so many entries
sharing one long key string multiplied it. Keys, and a key kept again
as the name, now spend the 16 MiB link and attachment text budget; an
embedded file whose key does not fit is not listed.
2026-10-22 22:03:43 +00:00
aiongg a0a66b982b fix(render): read an annotation attachment's Contents only when it names it
An annotation attachment's /Contents was read and charged to the text
budget before the file specification's /UF or /F, which then named the
attachment, so the discarded text could leave a later web address
unlisted. /Contents is now read only when neither name is there.
2026-10-22 22:02:10 +00:00
aiongg aaa4b99eb9 fix(render): spend the text budget on a rejected conversion
A web address or attachment text that converted to more than the budget
left spent nothing, so every link or attachment sharing it converted it
again. A conversion that comes out too long now spends the raw length,
and so does attachment text that trims to nothing.
2026-10-22 21:54:39 +00:00
aiongg 426a609795 fix(render): keep link addresses and attachment text within 16 MiB
The link and attachment listings copied a link's web address and an
attachment's name and description for every annotation or name-tree
entry, so many entries sharing one long string multiplied it in
memory. Together they keep at most 16 MiB of that text, and a string
past what is left is not converted. A link past it lists as a URI
action without its address, an attachment under its generic name
without a description.
2026-10-22 21:35:23 +00:00
aiongg c82dc91abf fix(render): list an annotation reached through a reference chain once
The annotation listing skipped a repeated /Annots entry by its raw
reference, so an indirect object holding only a reference to a link
listed that link a second time. Entries and page arrays are now told
apart by the object their reference chain ends at. The lopdf reader
reported the first object of a chain, because lopdf's get_object
already follows it; it now reports the last, as the lazy reader does.
2026-10-22 21:33:20 +00:00
aiongg 071130d498 fix(render): list links and attachments after the comment budget fills
Reaching the 64 MiB comment budget ended the whole annotation scan, so
links and file attachments listed after it were missing, and a later
JavaScript link left the document unmarked. Past the budget, comments
are no longer built, and the scan goes on for links and attachments.
2026-10-22 20:05:05 +00:00
aiongg a0e82da864 fix(render): bound the replacement text copied into redraws
Each unmarked redraw of an /ActualText span's glyphs took its own copy
of the replacement text. The work budget counts comparisons, not
bytes, so a long replacement around one glyph followed by many redraws
at the same place copied it once per redraw: gigabytes from a small
page. Redraws on one page share 4 MiB of replacement text; past it a
redraw keeps its own glyphs, as it does past the work budget.
2026-10-22 17:43:04 +00:00
aiongg dfde90787f fix(render): list a repeated annotation once and cap what the listing keeps
Inspection built an annotation record, with owned copies of its text,
for every /Annots entry on every page, so one comment referenced many
times, a page-shared /Annots array, or many small comments sharing one
long /Contents string multiplied that text in memory. Pages are read in
order, an annotation or /Annots array already listed is skipped, and
the listing stops once the kept text and geometry pass 64 MiB.
2026-10-22 17:08:54 +00:00
aiongg dcf2802f96 Merge r2 track t15: mixed: accessibility-tags, dialogs-prefs, javascript, organize-pages
# Conflicts:
#	crates/edit/src/tests.rs
#	crates/engine/src/tests.rs
2026-10-22 02:23:22 +00:00
aiongg 8bb2eef740 Merge r2 track t13: cos-parse, vendored-crate fixes
# Conflicts:
#	ATTRIBUTION.md
#	crates/annot/src/tests.rs
#	crates/forms/src/tests.rs
#	crates/organize/src/tests.rs
2026-10-22 02:21:53 +00:00
aiongg 123b214180 Merge r2 track t10: xfa 2026-10-22 02:21:06 +00:00
aiongg 69e755c439 Merge r2 track t08: fonts
# Conflicts:
#	crates/automation/src/tools.rs
#	vendor/README.md
2026-10-22 02:20:50 +00:00
aiongg 4d5025c6da Merge r2 track t07: text-extract-select
# Conflicts:
#	crates/edit/src/tests.rs
#	crates/render/src/raster.rs
#	vendor/README.md
2026-10-22 02:20:03 +00:00
aiongg a2c46a9298 Merge r2 track t06: annotations-comments
# Conflicts:
#	crates/automation/tests/automation.rs
#	crates/render/src/raster.rs
2026-10-22 02:19:23 +00:00
aiongg 0bba8dcafb Merge r2 track t04: render 2026-10-22 02:18:22 +00:00
aiongg e1652d5dbe Merge PR #3540: Render: radial luminosity fades have regression coverage
ROADMAP.md: progress log union, newest first
docs/roadmap.md: main's M2 notes with the PR's sentence appended
2026-10-22 01:52:42 +00:00
aiongg 07a9f286c4 Merge PR #3948: Reject rounded page rasters beyond the pixel budget 2026-10-22 01:52:27 +00:00
aiongg ec6a8166bb Integration: #3020 number its hayro-interpret patch 48 (40 is #2987's) 2026-10-22 01:51:55 +00:00
aiongg e2d3f30c63 Merge PR #3020: fix(render): draw each ICC profile through itself when two have the same stream dictionary (vendored hayro-interpret patch 40)
vendor/README.md: main's row plus the PR's hayro-interpret patch and tests, numbered 48 (40 is #2987's)
2026-10-22 01:51:47 +00:00
aiongg ad23e6e6e9 Merge PR #3184: fix(render): apply the JP2 palette of a JPX image with no /ColorSpace (#3179) 2026-10-22 01:51:22 +00:00
aiongg e61515f324 Merge PR #2987: fix(render): a visibility expression decides what an OCMD shows (#2986)
vendor/README.md: main's row plus the PR's hayro-interpret patch 40 and its test
2026-10-22 01:51:22 +00:00
aiongg b84121e978 Merge PR #3327: Render: a five-point polyline is no longer painted as its bounding box
vendor/README.md: main's row plus the PR's hayro-interpret patch and tests, numbered 47 (35 is #3296's)
2026-10-22 01:51:10 +00:00
aiongg 6fc4a18d9c Merge PR #2972: fix(render): blend modes over an empty part of the page keep their colour (#2970)
crates/render/src/raster.rs: main's tests plus the PR's #2970 test after the knockout test
vendor/README.md: main's rows with the PR's rewording of hayro patch 18
2026-10-22 01:50:51 +00:00
aiongg 554d9105f3 Merge PR #2974: fix(render): knockout transparency groups knock out (#2971)
crates/render/src/raster.rs: both new tests (#2975 stencil masks, #2971 knockout groups)
vendor/hayro/src/renderer.rs: set_paint returns main's PaintSetup; the PR's knockout erase early return wraps its clip in PaintSetup::Clip
vendor/README.md: main's rows plus the PR's hayro-interpret patch 39 and hayro patch numbered 22 (19 is #3296's), with tests
2026-10-22 01:49:59 +00:00
aiongg 61cbaf3e23 Merge PR #3246: Shading patterns use the stroke or fill alpha current at paint time (#3176)
vendor/hayro-interpret/src/pattern.rs: ShadingPattern::new takes the default colour spaces (#3018) and no opacity (this PR); without_opacity (#2977) and set_alpha both kept
2026-10-22 01:49:02 +00:00
aiongg 4949724ec8 Merge PR #3875: M4: a new bookmark goes to where the reader is (#3865) 2026-10-22 01:48:54 +00:00
aiongg a447dd3db5 Merge PR #2731: Layers panel: Reset to Initial Visibility
Conflicts:
- ATTRIBUTION.toml: ours (sha256 lines only); hashes recomputed at the end of the track
- crates/engine/Cargo.toml: main's workspace chrono entry, plus the PR's pdfcraft-testkit dev-dependency
2026-10-22 01:48:51 +00:00
aiongg 1ddbb5f3ff Merge PR #2977: fix(render): a stencil mask is drawn at the fill opacity once (#2975)
vendor/hayro/src/renderer.rs: main's PaintSetup::Clip match with the PR's fill paint (is_stroke false) and comment
vendor/README.md: main's row plus the PR's hayro-interpret patch and test, numbered 46 (35 is #3296's)
2026-10-22 01:48:34 +00:00
aiongg 7bcf25991d Merge PR #2397: Issue #2365: a rebuilt file keeps the /Info and /ID of its cross-reference stream
crates/cos/src/document.rs: #2220 moved the header scan into object_headers; it also returns the position after `obj`, and reconstruct applies this PR's /XRef candidate check (same 1024-byte window) to each header there. Tests: kept both sides.
2026-10-22 01:47:39 +00:00
aiongg a8b7d14709 Merge PR #3035: fix(render): mesh triangles that share an edge leave no seam
vendor/hayro-interpret/src/encode.rs: both sides; a pixel sampled by either test (corner held, or centre covered) widens the mesh extent from #3296
vendor/README.md: main's row plus the PR's patch 36 and its test
2026-10-22 01:47:35 +00:00
aiongg e47b64b009 Merge PR #2949: M2: a post table version with swapped halves doesn't make a font unusable (#2946)
vendor/README.md: hayro-interpret row keeps #2914's patch (26) extension and #2949's new patch (38) with both tests
2026-10-22 01:46:55 +00:00
aiongg 5a13228b57 Merge PR #3520: M5: a stamp grows and shrinks with its handles before release (#3518) 2026-10-22 01:46:28 +00:00
aiongg b1c8ae231a Merge PR #3643: fix(render): draw missing spacing glyphs in Japanese CID substitutes as spaces (#3601)
ROADMAP.md: progress log keeps both sides' lines
2026-10-22 01:46:04 +00:00
aiongg 498a7d60b9 Merge PR #3955: perf(render): read PDFCRAFT_TEXT_DEBUG once instead of per glyph 2026-10-22 01:45:49 +00:00
aiongg 6bb89022d0 Merge PR #2483: fix(content): an inline image ends at its own EI, not a later one
vendor/README.md: hayro-syntax row already has a (22) on main; this PR's patch and tests are numbered (23).
2026-10-22 01:45:49 +00:00
aiongg 2a17980645 Merge PR #2914: fix(render): draw comma-below letters in non-embedded standard fonts … 2026-10-22 01:45:44 +00:00
aiongg 0b51ea4baa Merge PR #3018: fix(render): draw device colour in the resources' /DefaultGray, /DefaultRGB and /DefaultCMYK (vendored hayro-interpret patch 38)
vendor/README.md: main's single hayro-interpret row plus the PR's patch 38 and its tests, placed before 41
2026-10-22 01:45:41 +00:00
aiongg add6907f6a Merge PR #3239: M3: extract text from glyph names outside the reference-app Glyph List (#3169, #3170) 2026-10-22 01:45:33 +00:00
aiongg dbb71754d0 Merge PR #3497: M2: Type 0 fonts with /ToUnicode /Identity-H read their codes as Unicode
contributors/people.toml: kept both new contributor entries.
2026-10-22 01:45:33 +00:00
aiongg bc857aa60c Merge PR #3686: fix(a11y): resolve /MarkInfo /Marked when it is an indirect reference (#3671) 2026-10-22 01:45:25 +00:00
aiongg 145a08ae96 Merge PR #3788: M5: drag a line's ends (and a polygon's corners) to change its length and angle
ROADMAP.md: union of progress-log lines.
crates/ui-egui/src/i18n/*.tsv (20 catalogs): union of appended keys.
2026-10-22 01:45:21 +00:00
aiongg 88402d93a2 Merge PR #3348: M2: preserve word spaces around TOC leaders (#3086)
ROADMAP.md: kept both progress-log entries, newest first.
2026-10-22 01:45:14 +00:00
aiongg 4749f2f6bd Merge PR #3720: fix(render): hit-test selection against the glyph quad, not its bounding box (#3693) 2026-10-22 01:44:55 +00:00
aiongg 5d7b9a98b3 Merge PR #3192: fix(forms): an XFA form whose config forbids dynamic rendering is static (#3180) 2026-10-22 01:44:51 +00:00
aiongg 4a73cacb85 Merge PR #3116: fix(render): emit clip-only text (7 Tr) to devices for text extraction (#3109) 2026-10-22 01:44:50 +00:00
aiongg c8e81d58d3 Merge PR #3681: M2: text extraction keeps doubled letters in text condensed to 20 Tz and below (#2457) 2026-10-22 01:44:48 +00:00
mtlcl410 09668ce885 M10: a swapped post 2.0 table's glyph names serve /Differences (#2946)
Review follow-up on #2949.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Gv2WwdgjmBz33GWkwgNn3Q
2026-10-22 08:40:08 +08:00