Commit Graph
5524 Commits
Author SHA1 Message Date
Grzegorz MartensandClaude Opus 5.5 587d6528b0 redact: the refusal test checks a copy with its filter by reference too
In `a_shared_jbig2_dictionary_that_cant_leave_refuses_the_redaction`, the case of a copy of
the dictionary whose `/Filter` is given by reference may end `Ok`, the image stored again
without it. That branch checked only that the dictionary, object 9, left, and that its marker
was nowhere in the file. But `assert_gone` can't decode the copy, object 10, with its filter by
reference, and its bytes are Flate, so a run that never found the copy, and left it in the
file, passed. The branch now checks that object 10 left too, through `reachable_objects`.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01AmsdeUCdTaD72jkDw2pJKY
2026-11-09 16:20:40 +01:00
Grzegorz MartensandClaude Opus 5.5 b9e83d8b67 Merge main again into fix/jbig2-dictionary-any-route
One conflict, in redact sanitize.rs. Main's #6021 (930b44131) split `remove_hidden` in two:
- it now counts only what the chosen categories need (`scan_only`);
- it hands the removal to `remove_counted`, which tests also call with `every_page`.

This branch had added one line to the old body: `kept_before`, what a full save keeps before
anything is removed. Main's side is taken whole, and that line is now the first thing
`remove_counted` does after finding the catalog, before any change to the document. So every
caller of `remove_counted` has it. `unshare_unmarked` stays last, after `unlink_undrawn`, and
merged cleanly there. The only early return after a change is `NothingToApply` when nothing
was removed and nothing unlinked.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01AmsdeUCdTaD72jkDw2pJKY
2026-11-09 13:05:41 +01:00
Grzegorz MartensandClaude Opus 5.5 1184738b54 redact: an image stored again keeps the generation its header gives
Main's #1143 (863af864a), merged in 77b9cfa31, has cos accept both generations of a slot whose
cross-reference row and object header disagree: `8 0` in the row and `8 1 obj` in the file, a
reference of either reads the object. `unshare` stored an image again with `Document::set` under
the row's generation, which keeps that one alone. A page that named the image by its header's,
`/Im 8 1 R`, then read null, in the document and after a full save: a redaction on another page
took the image off a page no mark reached.

It now stores it with `Document::set_existing`, which keeps both. It was the one object this
PR's code writes back after reading.

Test: `an_image_stored_again_keeps_the_generation_its_header_gives` patches the second page's
image to `8 1 obj` behind a row of generation 0, and its page to `/Im 8 1 R`. After a redaction
on the first page, that page still draws the scan, in the document and after `write_full` and
reopening, and the dictionary is gone.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01AmsdeUCdTaD72jkDw2pJKY
2026-11-09 13:00:28 +01:00
BFlat b6cbf9bb30 Merge pull request #6710 from storytold/merge/forms-links-text2
Land forms, links, find and redaction-save fixes (#4496, #4532, #3567, #3773, #4470, #4474, #4497, #5658)
2026-11-09 19:45:39 +08:00
BFlat 6b56de9ecf Merge pull request #6711 from storytold/merge/render-patches2
Land renderer patches, layer auto state, auto-tag artifacts, export clips and print page lookup (#3969, #4393, #4396, #4410, #4433, #4459, #4159, #5075, #5973)
2026-11-09 19:45:24 +08:00
BFlat 9f4191336d xtask: the private temp folder builder is mutable only on Unix (#6712) 2026-11-09 19:45:13 +08:00
Grzegorz MartensandClaude Opus 5.5 0a00862e91 redact: the shared-JBIG2 walk names by object number, and reads what it stores by number and generation
Main's #1143 (863af864a), merged in 77b9cfa31, makes cos read a reference whose generation isn't
its object's as null. The walk that finds what shares a /JBIG2Globals dictionary with what left
fetched through `Document::get`, but remembered what it read by object number alone, so a
reference of another generation and the object's own one shared what the first of them read:

- What a parameters value names (`Run::names_in`): `/DecodeParms [10 1 R 10 0 R]` on an image
  that left, object 10 naming dictionary 9, read 10 1 R as null, named nothing, and remembered
  that for object 10. The 10 0 R after it found it, so nothing named 9, and the dictionary
  stayed in the file with the image another page kept.
- A size, filters or parameters an image is stored again with (`Run::follow`): an image whose
  `/Width 11 1 R` reads as null can't be stored again, and refused the run alone. Once another
  image had read 11 0 R, it took that width and was stored with it.

What an image names is now read by object number, whatever generation the reference gives
(`Run::fetch_numbered`), in `names_in` and in the `/JBIG2Globals` chain alike: a reader that
doesn't compare generations draws with that object, so what an image that left names this way
may hold its shapes. That is how the chain already named `9 1 R` (the "another generation" way
out), and how both read before #1143. What is read by number is remembered by number. The
values an image is stored again with are read as cos reads them, and remembered by number and
generation, so a reference of another generation reads its own way.

`kept`'s comment said a reference reads the object of its number whatever its generation, which
is no longer so for a full save. It says how `reachable_objects` reads one now. The README and
`Run`'s comments say which reads take the number and which the generation too.

Tests:
- `a_redacted_scans_shared_jbig2_dictionary_leaves_the_file` gains three ways out:
  - parameters through another generation, then their own;
  - parameters through another generation alone;
  - a `/JBIG2Globals` reference to a reference of another generation.
- `a_size_through_another_generation_isnt_the_one_its_own_reference_reads` stores no image
  with the width another reference read. It refuses instead.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01AmsdeUCdTaD72jkDw2pJKY
2026-11-09 12:38:38 +01:00
bflatastic e917cc2cc6 Fit the landed changes together 2026-11-09 18:24:27 +07:00
bflatastic 8183f96b37 Merge #5973: fix(print,engine): read the page tree once when finding which pages' text reads up
# Conflicts:
#	crates/print/src/tests.rs
2026-11-09 18:22:45 +07:00
bflatastic 6404602e63 Merge #5075: fix(edit): Office export respects a form's /BBox and a page's re/W/n clip
# Conflicts:
#	crates/edit/src/text/lines.rs
2026-11-09 18:22:16 +07:00
bflatastic e767b244ee Merge #5658: M5: the text selection bar stays inside the pages' area (#5577)
# Conflicts:
#	crates/ui-egui/src/canvas/selection.rs
2026-11-09 18:22:01 +07:00
bflatastic 117f3b1102 Merge #4497: M8: after Apply redactions, Save asks where and proposes the name with _Redacted (protect.redact-filename-suffix) 2026-11-09 18:21:20 +07:00
bflatastic 86c97aca30 Merge #4159: fix(a11y): mark vector graphics and images as artifacts in autotag_text (#4080)
# Conflicts:
#	crates/a11y/src/autotag.rs
2026-11-09 18:21:12 +07:00
bflatastic d8dad6f9ef Merge #4474: M3: relative links resolve against the document's base URI, and a link is active only in its QuadPoints (view.follow-links) 2026-11-09 18:20:36 +07:00
bflatastic 4494642b05 Search reads ligatures through the page text's ligature_letters 2026-11-09 18:20:36 +07:00
bflatastic 70aa8e5c0c Merge #4459: M2: the standard 14 fonts fit the Euro to its standard width (view.render-pages)
# Conflicts:
#	vendor/README.md
2026-11-09 18:19:55 +07:00
bflatastic baa131de70 Merge #4433: M2: zero-area fills and clips mark the pixels they touch (view.render-pages)
# Conflicts:
#	vendor/README.md
#	vendor/hayro-interpret/src/interpret/path.rs
2026-11-09 18:19:48 +07:00
bflatastic 93e45776f2 Merge #4470: M3: Find matches ligatures and words split by a line-end hyphen (#4469) 2026-11-09 18:19:30 +07:00
bflatastic 68abeedc57 Merge #3773: M9: empty signature fields show a Sign tab, sized to the field
# Conflicts:
#	crates/ui-egui/src/canvas/page_input.rs
2026-11-09 18:19:30 +07:00
bflatastic 06a9385543 Merge #4410: fix(render): degenerate subpaths, all-zero dash arrays and negative line widths stroke as the spec says (hayro-interpret patch 61)
# Conflicts:
#	vendor/README.md
2026-11-09 18:19:14 +07:00
bflatastic 0dda66820c Merge #4396: M2: layers open in the state the view auto state sets, and the Layers panel follows /Order (view.layers-panel)
# Conflicts:
#	crates/render/src/inspect.rs
#	crates/render/src/lib.rs
#	vendor/README.md
2026-11-09 18:19:07 +07:00
bflatastic d18a968c33 Merge #3567: M6: a drop-down shows its arrow, and its list looks and works like the form's own
# Conflicts:
#	crates/ui-egui/src/tools/forms_ui.rs
#	crates/ui-egui/tests/it/forms.rs
#	parity/acrobat-features.toml
2026-11-09 18:18:56 +07:00
bflatastic 15a264ff04 Merge #4393: M2: an Indexed image with a short lookup table or an out-of-range hival is drawn as most readers draw it, and one with no table is skipped with a warning (view.render-pages)
# Conflicts:
#	vendor/README.md
2026-11-09 18:17:39 +07:00
bflatastic de333340a5 Merge #4532: M6: list boxes show and pick the option /I names, and a single-select list shows one value (#4531)
# Conflicts:
#	crates/automation/src/tools.rs
#	crates/forms/src/lib.rs
#	crates/forms/src/tests.rs
#	crates/forms/src/values.rs
#	crates/ui-egui/src/tools/forms_ui.rs
#	crates/ui-egui/tests/it/forms.rs
2026-11-09 18:17:35 +07:00
bflatastic 5257a6a34a Merge #3969: M10: a symbolic TrueType font without an encoding reads its glyph names (#3962)
# Conflicts:
#	vendor/README.md
2026-11-09 18:17:22 +07:00
bflatastic c38db36ae4 Merge #4496: M6: a check box's kids with different on states tick one at a time (form.fill-checkbox-radio) 2026-11-09 18:14:35 +07:00
BFlat 9ee213eff7 Fix main's build and tests after the latest merges (#6706) 2026-11-09 19:12:07 +08:00
mtlcl410 cf7734b17e Merge upstream/main into fix/standard14-euro-width 2026-11-09 19:07:08 +08:00
mtlcl410 5ac623ff9f Merge upstream/main into fix/zero-area-fill-and-clip 2026-11-09 19:05:11 +08:00
mtlcl410 299e263bf9 Merge upstream/main into fix/stroke-degenerate-and-dash 2026-11-09 19:02:50 +08:00
Grzegorz MartensandClaude Opus 5.5 77b9cfa310 Merge main into fix/jbig2-dictionary-any-route
Conflicts, and how they were resolved:

- cos writer.rs and lib.rs: main now numbers a full save in `full_save_order` and exports
  `reachable_objects`, the object numbers a full save writes, for the pattern guard. This
  branch had added the same walk as `walk` and `reachable`. Main's is kept, with its alias
  handling, and this branch's is dropped: `globals::kept` is now `reachable_objects`, so the
  JBIG2 cleanup and the pattern guard read one walk. `kept` returns the walk's error (a save
  that can't number its objects), which redaction and Remove Hidden Information pass on. The
  cos test of what is reachable, and two redaction tests, read `reachable_objects` instead.
  The exports keep this branch's `DECODE_PARMS_KEYS` and main's `TextChars`,
  `civil_from_days` and `new_file_id`.
- redact lib.rs: main unlinks pruned patterns from `/Pages` nodes after `unlink_doomed`; this
  branch replaced `restore_shared_jbig2` with `globals::unshare`. Both stay, the unlink first:
  an image a pruned pattern's cell drew leaves the file with it, and is a user of a dictionary
  that left too.
- redact sanitize.rs: main's `strip_outline_actions` and this branch's `unshare_unmarked` both
  stay. At the end of `remove_hidden`, `unshare_unmarked` runs after main's `unlink_undrawn`,
  so an image unlinked for being drawn nowhere takes a shared dictionary with it, and is
  followed by main's `require_full_save_with_new_id`.
- redact image.rs: `MAX_PIXELS` is `pub(crate)` on both sides; the comment names
  `globals::without_dictionary`, where this branch moved `without_globals`.

Tests: `an_undrawn_image_unlinked_takes_a_shared_jbig2_dictionary_too` (Remove Hidden
Information, through `unlink_undrawn`) and
`an_image_a_pruned_patterns_cell_drew_takes_a_shared_jbig2_dictionary_too` (a redaction,
through `unlink_pruned_patterns`) pin the order of the two new routes before `unshare`.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01AmsdeUCdTaD72jkDw2pJKY
2026-11-09 11:59:18 +01:00
mtlcl410 ad0fab3339 Merge remote-tracking branch 'upstream/main' into lane4-4474b
# Conflicts:
#	crates/automation/src/tools.rs
#	crates/automation/tests/it/automation.rs
#	crates/ui-egui/tests/it/document_links.rs
2026-11-09 18:52:46 +08:00
mtlcl410 ad42d5c276 Merge upstream/main into fix/indexed-short-lookup 2026-11-09 18:48:21 +08:00
mtlcl410 60de09e1a5 Merge remote-tracking branch 'upstream/main' into lane4-4470b
# Conflicts:
#	crates/render/src/text/search.rs
#	crates/render/tests/it/search.rs
2026-11-09 18:43:43 +08:00
mtlcl410 7096266c48 M6: give the custom-validation test's ScriptResult its value_set field 2026-11-09 18:41:47 +08:00
Dylan M. Taylor dafb3be3de fix(xfa): one decoding allowance for all XFA packets (#6000) 2026-11-09 18:38:52 +08:00
Dylan M. Taylor b4679deafd fix(cli): cap input reads, budget check's edit pass and escape its stderr records (#5997) 2026-11-09 18:38:34 +08:00
Dylan M. Taylor ba47f7bbc5 fix(cli): render needs the copying permission, as text does (#5990) 2026-11-09 18:38:17 +08:00
Dylan M. Taylor f800c12a7e fix(xtask): render-oracle writes page pixels into a private temporary folder (#5988) 2026-11-09 18:38:01 +08:00
Dylan M. Taylor 4cdc3d15dd fix(redact): read the page tree once per sanitize pass, not per page (#5983) 2026-11-09 18:37:46 +08:00
Dylan M. Taylor 8f29ed66f9 fix(engine): open linked documents without blocking and check the handle is a regular file (#5982) 2026-11-09 18:37:30 +08:00
Dylan M. Taylor 3fe86a118e fix(print,a11y): read summary scans one operator at a time and borrow form resources (#5968) 2026-11-09 18:37:07 +08:00
Dylan M. Taylor 0d4074755d fix(automation): sign_trust deduplicates certificates with a set (#5965) 2026-11-09 18:36:50 +08:00
Dylan M. Taylor ca56433f5f fix(redact): read text-state operands from the end, as the renderer does (#5951) 2026-11-09 18:36:34 +08:00
Dylan M. Taylor 44a26f4b93 fix(model,oracle): read a page box only when it has four entries; skip empty images (#5941) 2026-11-09 18:36:19 +08:00
Dylan M. Taylor 743a772ee9 fix(content): an inline image only the renderer reads counts as ambiguous (#5874) 2026-11-09 18:36:04 +08:00
.CooCoo e78102c907 M11: PDF Optimizer can discard form submission, import and reset actions (optimize.discard-form-actions) (#4416) 2026-11-09 18:35:01 +08:00
Livio Oswald ba2846cba8 M4: a recovered document's first Save asks where instead of writing the sidecar's path (#3923) (#4327) 2026-11-09 18:33:33 +08:00
mtlcl410 5588db4b62 M10: (n) names the page at position n, whatever its label, in page ranges and the page box (print.page-range) (#4282) 2026-11-09 18:33:17 +08:00
pat26-dotcom 8f5373a7d1 M12: turn a layout table into Div and P tags in one call (#4105) (#4250) 2026-11-09 18:33:01 +08:00