Commit Graph
6348 Commits
Author SHA1 Message Date
mtlcl410andClaude Opus 5.5 17ad6701d0 M12: wireless89's reset and reopen tests for opening scripts (#4790)
Adds three regression tests from wireless89's review of #4791:
- xfa_opening_reset_reaches_a_section_shown_by_an_earlier_script (a text field of a section
  an earlier opening script showed is reset in the widget and the saved data);
- xfa_deferred_choice_resets_preserve_the_reset_value_through_reopen (the same for choice
  lists: multi-select with structured picks and an empty or set default, and a label saved
  as its export value; widget, open datasets and saved datasets checked separately);
- xfa_initialize_scripts_that_hide_subforms_lay_the_form_out_once now edits the check box
  and checks fields, pages and the value through three save/reopen cycles.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Pq7HyCfwzyRXj4VfQAVVdv
2026-11-02 11:25:04 +08:00
mtlcl410andClaude Opus 5.5 1f51b5c246 Merge storytold/pdfcraft main into fix/xfa-open-scripts-complete
Conflicts, each resolved by keeping both sides:
- parity/acrobat-features.toml (dynamic XFA entry): main added the rotate
  evidence and the note on draws turning about their anchor; this branch
  added its open-script evidence and notes. Both kept on the one line.
- crates/engine/src/tests.rs and crates/xfa/src/tests.rs: both sides added
  tests at the end of the file. Both kept.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Pq7HyCfwzyRXj4VfQAVVdv
2026-11-02 11:24:57 +08:00
mtlcl410andClaude Opus 5.5 ca258d8fb5 Merge storytold/pdfcraft main into fix/search-ligature-accent-hyphen
No conflicts.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Pq7HyCfwzyRXj4VfQAVVdv
2026-11-02 11:22:48 +08:00
mtlcl410andClaude Opus 5.5 2b74366c64 M6: the engine checks that the XFA data layer and forms spell state names alike
pdfcraft-xfa keeps its own copy of pdfcraft_forms::name_text (it can't
depend on forms), and a radio group's value only finds its button while the
two agree. xfa_and_forms_spell_names_alike compares them, and checks that
forms' name_bytes reads the copy's spelling back, for UTF-8, '#', Shift-JIS
and stray bytes. With the copy writing lowercase hex it fails at the
Shift-JIS case.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Pq7HyCfwzyRXj4VfQAVVdv
2026-11-02 10:53:08 +08:00
mtlcl410andClaude Opus 5.5 48c6a85cee M6: arrow keys in a same-name twin list box step through its own rows
The focus now carries the focused field's object, so the overlay, the
draft commit and the focus frame use the twin that has the focus rather
than the first field with its name. The arrow keys pick by position
through the same twin mapping a click uses (list_pick_edit), so an arrow
in a twin listing its options in another order picks its own next row.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Pq7HyCfwzyRXj4VfQAVVdv
2026-11-02 10:47:28 +08:00
mtlcl410andClaude Opus 5.5 24e0d070ef M10: the print crate's tests delay-load the print DLLs too (#2630)
The pdfcraft-print unit-test executable imported windows.data.pdf.dll and
prntvpt.dll at load time (the windows crate binds them with raw-dylib), so
on a Windows installation without them it could not start, and the tests
of the missing-DLL guard never ran there. crates/print/build.rs now passes
/DELAYLOAD for both and delayimp.lib on MSVC, as the applications' build
scripts do. Link arguments from a build script reach only this package's
own executables, so dependents are unaffected.

dumpbin /imports: before, both DLLs under "the following imports"; after,
under "the following delay load imports". A copy of each test binary with
prntvpt.dll renamed to a DLL that doesn't exist: the old one exits with
0xC0000135 (STATUS_DLL_NOT_FOUND) before main, the new one starts and runs.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Pq7HyCfwzyRXj4VfQAVVdv
2026-11-02 10:23:34 +08:00
dotCooCoo c927f620a9 Merge main into feat/redacted-file-name 2026-11-01 18:20:56 -08:00
dotCooCoo f13d6db75a Merge main into discard-search-index 2026-11-01 18:09:23 -08:00
dotCooCoo 40d7c6cbd7 Merge main into discard-external-refs 2026-11-01 17:58:56 -08:00
mtlcl410andClaude Opus 5.5 40260c4a6d M7: the signature mark stays until the save succeeds, and a reload forgets it (#2149)
Answering the lock question removed the placed-signature mark before the save ran, so a
save that then failed or was cancelled didn't ask again. The answer now only lets the save
that follows go ahead without asking; the mark is removed when a save succeeds, as before.
A reload from disk replaces the document, so it forgets the mark too (a failed reload keeps
it).

Review on #2348 (CodeRabbit).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Pq7HyCfwzyRXj4VfQAVVdv
2026-11-02 09:42:26 +08:00
mtlcl410andClaude Opus 5.5 7a84239ad7 Merge storytold/pdfcraft main into fix/indexed-short-lookup
main gave the colour-space constructors a nesting depth (ColorSpace::within) and read the
Indexed lookup once by type (patch (71)). Indexed::new keeps this PR's recovery (hival
truncated and clamped, black past a short table, no table skipped) with main's depth bound;
vendor/README.md takes main's rows with this PR's patch (60) entries after (59).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Pq7HyCfwzyRXj4VfQAVVdv
2026-11-02 09:29:41 +08:00
mtlcl410andClaude Opus 5.5 78c5262600 M2: test the W* clip of overlapping zero-area subpaths too
disconnected_subpaths_on_one_line_leave_the_gap_between_them_unpainted
checked overlapping subpaths drawn in opposite directions under f* only.
It now checks the W* clip of the same path keeps their union too: with
the clip area pushed under the path's own even-odd rule instead of
non-zero, the overlap goes missing and the new assertion fails.

Review on #4433 (CodeRabbit, crates/render/tests/it/zero_area_fill_clip.rs).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Pq7HyCfwzyRXj4VfQAVVdv
2026-11-02 09:25:20 +08:00
mtlcl410andClaude Opus 5.5 8f75c414e9 M5: comments are sized with the border width they are drawn with
border_width_of, which fits a text box's new text and sizes callouts,
polygons and line endings, read only /BS /W (and turned a negative width
into 0), while the appearance draws with appearance::border_width: /BS /W,
else /Border's third number, 1 for an unusable one. A text box with
/Border [0 0 4] and no /BS was drawn with a 4-pt border but fitted as if
it had a 1-pt one, 6 pt shorter. border_width_of now is that rule.

Review on #4365 (CodeRabbit, crates/annot/src/modify.rs).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Pq7HyCfwzyRXj4VfQAVVdv
2026-11-02 09:11:53 +08:00
mtlcl410andClaude Opus 5.5 95ba736d66 M5: a callout knee with a coordinate that isn't a number takes the bottom side whatever the other
callout_side's doc says a coordinate that isn't a number takes the bottom
side, but every comparison with NaN is false, so the other coordinate
alone decided: [NaN, y above the box] gave Top, [x left of it, NaN] Left.
A NaN coordinate is now checked before any comparison.

Review on #4094 (CodeRabbit, crates/annot/src/create.rs).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Pq7HyCfwzyRXj4VfQAVVdv
2026-11-02 09:07:57 +08:00
mtlcl410andClaude Opus 5.5 7e1e5c0dbb M2: remove two rebase backups committed by mistake
crates/ui-egui/src/panels/right.rs.orig and crates/automation/src/json.rs.orig
were left by a merge tool in 211718668. Neither is compiled (the modules
load right.rs and json.rs), and right.rs.orig still drew the old flat
Layers list, so a reader searching the tree could take it for the code.

Review on #4396 (CodeRabbit, crates/ui-egui/src/panels/right.rs.orig).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Pq7HyCfwzyRXj4VfQAVVdv
2026-11-02 09:04:14 +08:00
mtlcl410andClaude Opus 5.5 c7404f44bc M7: reverting forgets a signature placed since the last save (#2149)
File > Revert discards a signature placed since the last save, but its marker stayed, so the
next save asked to lock a signature that was gone whenever the saved file held an earlier
Fill & Sign mark. A successful revert now clears the marker.

Review on #2348 (CodeRabbit).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Pq7HyCfwzyRXj4VfQAVVdv
2026-11-02 08:41:35 +08:00
mtlcl410andClaude Opus 5.5 a06ff3769f M7: locking a signature clears the comment selection (#2149)
Review follow-up on #2348: flatten_fill_sign_in refreshed the view after Edit::FlattenFillSign but kept view.comments.selected. The placed signature is usually the selected comment, and once it is part of the page its (page, index) names nothing, or another comment after the indices shift. Both Lock now and the save-time Lock and save go through flatten_fill_sign_in, so both clear it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Pq7HyCfwzyRXj4VfQAVVdv
2026-11-02 08:31:10 +08:00
mtlcl410andClaude Opus 5.5 78e15fc4cf i18n: translate the signature-lock prompts into the newer catalogues (#2149)
Catalan, Sorani, Finnish, Hindi, Indonesian, Korean, Lao, Norwegian Bokmål, Romanian, Albanian and Thai joined main after this branch was written; their coverage tests ask for these strings too. AI-assisted, as noted in each catalogue.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-02 08:31:10 +08:00
mtlcl410andClaude Opus 5.5 b92d937c91 M7: offer to lock a signature right after it's placed, and keep the switch in the panel (#2149)
benandez's review suggestion on #2348. Right after Fill & Sign places a
signature or initials, a notice says "Signature added. Others can move it
until it's locked." with Lock now, which flattens the marks into the page
(undoable) without saving; the save that follows then has nothing to ask
about. The placed-signature mark is kept, so undoing the lock brings back the
notice and the save-time question, which stays as the fallback. Dismiss hides
the notice until the next signature. No notice on a digitally signed document
or when saves lock anyway. The "Lock into the page when saving" switch is
now once, in the panel's Sign yourself section, no longer in the Sign menu
over the page. The three new strings are in all 22 catalogues (AI-assisted,
not reviewed by native speakers).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-02 08:30:45 +08:00
mtlcl410andClaude Opus 5.5 58e28e1950 M7: a web save forgets the placed signature too (#2149)
Review follow-up on #2348: as the native save does, so a later save with the
question turned back on doesn't ask about what was already saved.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-02 08:30:44 +08:00
mtlcl410andClaude Opus 5.5 30aa8793f6 M7: the lock question keeps the changed-on-disk question, skips signed documents and undone marks (#2149)
Review follow-ups on #2348 (benandez): a dialog an answer opened this frame
isn't closed with it; documents with digital signatures aren't asked, since
locking changes them after signing; a placement that was undone asks nothing;
the mark is forgotten when the tab closes; the other catalogues carry the
AI-assisted header; parity evidence lists the new tests.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-02 08:30:44 +08:00
mtlcl410andClaude Opus 5.5 c2b1de2b8b M7: a signature lock that fails keeps the question and the preference (#2149)
Review follow-up on #2348: the document stays tracked as holding a placed
signature and "Don't ask again" is remembered only once locking succeeded.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-02 08:30:22 +08:00
mtlcl410andClaude Opus 5.5 97f514d632 M5: Vietnamese for the lock-signatures prompt (#2149)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-02 08:30:21 +08:00
mtlcl410andClaude Opus 5.5 07a5f3f3a1 M5: the first save after placing a signature asks to lock it into the page (#2149)
A Fill & Sign signature stays a removable comment unless Flatten Fill &
Sign when saving is on, which sat only in Preferences. The first save
after a signature or initials is placed now asks: Lock and save flattens
the document's Fill & Sign marks, Keep editable saves as before, Cancel
saves nothing, and Don't ask again turns the answer into the
preference. The Sign menu carries the same switch.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-02 08:30:09 +08:00
mtlcl410andClaude Opus 5.5 0e70564cec M6: radio states are spelled as the AcroForm reads them, # and non-UTF-8 bytes too
radio_widgets read each button's on-state name with from_utf8_lossy,
while the group's value it is compared with comes from pdfcraft_forms,
which writes '#' as #23 and bytes that are not UTF-8 as #XX (name_text).
A state /A#23B (the bytes A#B) or a Shift-JIS /#82#CD then matched no
button: saving wrote the state's text as the item instead of the button's
/Opt entry, and opening returned a state no button has. The states are
now spelled with the same rules (a copy of name_text: this crate can't
depend on pdfcraft-forms).

Also pins that taking the XFA out notes no lost data when the data names
the shown button by its /Opt entry while saving would write its /PCOn.

Review on #4784 (CodeRabbit, crates/xfa/src/data/values.rs and
crates/engine/src/xfa_form.rs).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Pq7HyCfwzyRXj4VfQAVVdv
2026-11-02 08:18:59 +08:00
Grzegorz MartensandClaude Opus 5.5 13422bf279 M8: the shared JBIG2 refusal says no more than it knows
apply works on a copy, so nothing changes when it refuses, but remove_hidden
isn't transactional: a direct caller's document is part changed by then. The
message said nothing was changed for both. The app's callers work on copies.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01AmsdeUCdTaD72jkDw2pJKY
2026-11-02 01:15:53 +01:00
mtlcl410andClaude Opus 5.5 8cc5b81e8d M12: the table row test checks every cell's height, not only the first
table_rows_of_minimum_height_cells_fill_the_page_at_that_height read the
height of the first widget on the first page only, and counted only the c
cells per page. A shorter last row leaves both the counts and that one
height as they were (checked: with the last row at minH 0.3in the old
assertions pass). It now collects the c and d cells of every row on every
page and asserts each is 28.8pt, with 60 and 20 cells.

Review on #5124 (CodeRabbit, crates/xfa/src/tests.rs).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Pq7HyCfwzyRXj4VfQAVVdv
2026-11-02 08:04:34 +08:00
mtlcl410andClaude Opus 5.5 ba16b9b5b8 M2: a segment after h begins a new subpath (hayro patch 61)
ISO 32000-2 §8.5.2.1, Table 58: h "terminates the current subpath.
Appending another segment to the current path shall begin a new subpath,
even if the new segment begins at the endpoint reached by the h
operation." kurbo carries a segment after ClosePath on from the subpath
start without a MoveTo, so resolve_degenerate_subpaths saw "h" then an "l"
back to that point as part of the closed subpath, and the round-cap dot
of that degenerate subpath was lost (main drew it, through the nudge this
PR removed). l, c, v and y after h now start with a MoveTo to the point h
reached.

Review on #4410 (CodeRabbit, vendor/hayro-interpret/src/interpret/mod.rs).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Pq7HyCfwzyRXj4VfQAVVdv
2026-11-02 08:00:22 +08:00
Osvaldo DuranandClaude Opus 5.5 f35de22d21 feat(print): print a selected area from Take a Snapshot
The area Take a Snapshot copies stays outlined with a small menu under it:
Print area… and Save as image… (PNG). Print area… opens Print with
"Selected area (page N, size)" under Pages to Print; the area prints alone,
as a page of that size, with Fit, Actual size, Shrink or a custom scale,
clipped to the area. Multiple, Booklet, Poster and Label stay for pages.

- print: Settings.area (one page's rectangle in display space, y up),
  placed with place_crop under a Size layout; other layouts are refused.
- ui: PrintDraft.area and Which::Area; only Size is offered while the area
  is chosen. Another tool puts the area and its menu away.
- automation: doc_print takes area [x0, y0, x1, y1] from the top-left.
- Five new labels in all 22 catalogs (ATTRIBUTION.toml checksums
  refreshed); parity print.selected-area; ROADMAP progress log.

Requested in #2051.

Carries the review fixes:
- Save as image: save this tab's area, not the last snapshot taken anywhere
- Web downloads: type the file by its extension; keep the snapshot area after Print area
- Clear the copied area of every tab when Snapshot is left
- i18n(ui): carry this PR's new wordings in the catalogues that must cover them
- style: rustfmt after the merge with main
- Use Id::unique for the snapshot area menu (Id::new is deprecated in egui 0.37)
- rustfmt
- print area: refuse an area that isn't finite, and a page out of range first

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-01 18:53:54 -05:00
Osvaldo DuranandClaude Opus 5.5 d06154ac80 Print production: Convert colours (grayscale, RGB, CMYK by the device formulas)
Every colour operator in the pages' content and the Form XObjects it draws is
rewritten in the target space by the standard device formulas, source colours
read through the space in force (edit/src/colour.rs: device, ICCBased, CalRGB/
CalGray, Lab, Indexed, Separation/DeviceN through a Type 2 tint). Preserve black,
pictures too (optimize::recolour_image: 8-bit gray/RGB re-encoded, JPEG stays
JPEG, CMYK lossless), comments' and fields' appearances optionally.
Edit::ConvertColours (one undo step; refuses when nothing changes, so
Session::count_colours counts first), the Convert colours dialog, command
prepress.convert_colors, tool doc_convert_colours, rows in every language
(RGB and CMYK allowed unchanged in the Ukrainian and Kazakh checks), parity
print.convert-colors shipped.

Carries the review fixes:
- ATTRIBUTION.toml: the language files' checksums after the new rows
- Convert colours: keep RGB and CMYK as-is in the Czech and Turkish menu-label checks
- Convert colours: CMYK black start, shared objects copied, streams kept apart, guarded count
- Convert colours tests: drop an unused helper
- Format with rustfmt
- i18n(ui): carry this PR's new wordings in the catalogues that must cover them
- Parity: evidence paths follow the tests moved into tests/it
- fix(colours): comment permission for appearances; page range per document
- fix(convert-colours): say what it is not, and what it leaves behind

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-01 18:53:50 -05:00
Osvaldo DuranandClaude Opus 5.5 8c6c5a261b Print production: Add printer marks (dialog, edit, tool)
Trim marks at the trim box's corners, dashed bleed marks at the bleed box,
registration targets, a colour bar and a page-information line, drawn outside
the trim box as a removable page mark (MarkKind::PrinterMarks); the page is
widened to make room when asked and the trim box stays, so the printed page
cuts the same. Edit::AddPrinterMarks (scope Full, undoable) and Remove printer
marks through Edit::RemoveMarks; Dialog::PrinterMarks reachable from the
catalog, the palette and --view printer-marks; tools doc_printer_marks and
doc_remove_marks kind printer_marks; rows in every language; parity
print.printer-marks shipped.

Carries the review fixes:
- ATTRIBUTION.toml: the language files' checksums after the new rows
- Printer marks: drop the unreachable AddPrinterMarks pattern in scope_of
- Tests: printer marks read the document's marks through upstream's marks() (#1434)
- Printer marks: make room inside the crop box and keep the trim box on rerun
- Format with rustfmt
- Printer marks: keep accented labels and make room for the bleed marks
- Printer marks test: the page is letter size, so the bleed marks (33 pt beyond the trim box) fit
- i18n(ui): carry this PR's new wordings in the catalogues that must cover them
- Parity: evidence paths follow the tests moved into tests/it
- Fix the build after merging upstream/main
- fix(printer-marks): refuse numbers out of range, print on every plate

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-01 18:53:50 -05:00
Grzegorz MartensandClaude Opus 5.5 580abc51cf M8: a shared JBIG2 dictionary leaves with whatever used it, by any route
Redaction starts from the images a run replaces or removes and the forms
and soft masks under them, so a dictionary used by something that left
another way stays, with apply returning Ok: a stamp or widget appearance, a
Type 3 glyph, an /Alternates entry, a /Mask, or an image with /Filter by
reference or /DecodeParms through a reference to a reference. A
byte-identical copy stays too, which is what pdfseparate then pdfunite
leaves, and Remove Hidden Information never takes a dictionary out.

Compare what a full save would keep before and after the run instead, the
same walk write_full makes, now cos::reachable. What left names the
dictionaries, in any entry of its parameters; what stays that names one, or
a copy, is stored again without it; and the walk is taken once more, so a
dictionary still kept refuses the run, whatever keeps it. An image with
/Width, /Height or /Filter by reference is read, and is one bit in the copy,
as it was when drawn. /Alternates stays with what is stored again, and a
stream that isn't JBIG2 refuses rather than being stored.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01AmsdeUCdTaD72jkDw2pJKY
2026-11-02 00:45:31 +01:00
oracola91 2468d8e470 Say why the form path prunes Type 3 fonts without a page
Annotation appearances draw through a page's resources, never through a
form's own, so the form path passes no page. The form's own patterns
and soft masks are still counted. Asked in review.
2026-11-02 01:35:12 +02:00
mtlcl410andClaude Opus 5.5 b56bb840bf M2: a stroke colour and a shading in an Indexed space with no lookup table keep the upstream handling (ISO 32000-2 8.6.6.3)
Tests for the mutation pass on c709dd99e:
- a_fill_colour_in_a_space_with_no_table_keeps_the_fallback now covers
  CS/SC too;
- a_shading_in_a_space_with_no_table_is_not_drawn checks that only
  images and the colour operators see a tableless space.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Pq7HyCfwzyRXj4VfQAVVdv
2026-11-02 07:34:01 +08:00
mtlcl410andClaude Opus 5.5 c709dd99ec M2: indices past a short Indexed table draw black in every base space, and an image with no lookup table is not drawn (ISO 32000-2 8.6.6.3)
Seven readers were compared on synthetic files. Most draw the entries a
short table holds and black past them, and none draws an image whose
lookup is missing.
- Indexed::new keeps how many entries the table holds in full. Indices
  at or past that are set to black after conversion, so DeviceCMYK,
  ICCBased, Separation, DeviceN and Lab come out black too (zero bytes
  gave white, or blue in Lab). Fill and stroke colours follow the same
  rule. An incomplete last entry counts as missing.
- A lookup that is missing, null, a number, or a stream that does not
  decode (or decodes to nothing although it holds data) is no table.
  ColorSpace::new_allowing_tableless builds such a space marked
  tableless (for the resource cache and ImageXObject::new only), and
  the image is skipped with MalformedIndexedImage. A cs/CS colour in it
  keeps the upstream DeviceGray fallback with ColorFallback. Every other
  caller still gets None, as upstream.
- hival clamping and truncation are unchanged, and so is case C.
- The warning now reads "an image with a malformed Indexed colour table
  may be drawn wrongly or not at all".
- vendor/README.md: the patch (60) row is one line again. 3275f853c
  split it.

Tests: indexed_lookup.rs now has 25 tests, including one per base space
(DeviceGray, DeviceCMYK, Lab, Separation, DeviceN, and ICCBased N=4
drawn through its alternate). Against 6179cf795, 13 fail, including
every base space except DeviceGray, where zero is black. Against
b6f93a3ae, 19 fail.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Pq7HyCfwzyRXj4VfQAVVdv
2026-11-02 07:32:46 +08:00
FredApps f89a5917ed M2.6: streams made in memory enlarge a run's image allowance as a file's bytes do 2026-11-01 23:52:37 +01:00
FredApps 5eb82d1f68 M2.6: an image pays for the pixels its data holds, not those its size declares 2026-11-01 23:52:07 +01:00
FredApps 74d51ebf4a M2.6: a JBIG2 image stored again without its globals decodes within the run's allowance 2026-11-01 23:50:39 +01:00
FredApps bc4acf7bfc Merge origin/main into feat/jbig2-run-allowance 2026-11-01 23:50:04 +01:00
FredApps 0cba87ae6f Merge pull request #5677 from Arch-amon/arclight/freehand-hotbar
feat(ui,annot): customizable hotbar strip, freehand highlight, and moveable navigation rail
2026-11-01 23:34:38 +01:00
FredApps 85c8a2a0bf Merge pull request #5474 from Piohrun/feat/redact-bilevel-codec
M8: a redacted black-and-white scan is stored as Group 4, or JBIG2 again, when smaller (protect.redact-image-pixels)
2026-11-01 23:09:46 +01:00
FredApps 0b2f93538d test(ui): target the Bookmarks submenu item explicitly (#5677) 2026-11-01 22:57:53 +01:00
FredApps 616ddca371 M8: images stored again without shared JBIG2 globals are stored as a cleared copy is
An image that shared a redacted image's /JBIG2Globals is now stored
again as the smallest of Flate, Group 4 or JBIG2 coded alone (smallest),
like a cleared copy, rather than always Flate, so the other pages of a
scan don't balloon either. The shared-globals test's second page is a
ragged scan and checks it is no longer Flate and is smaller.
2026-11-01 22:48:29 +01:00
FredApps 54d0ea7c59 Merge branch 'main' into feat/redact-bilevel-codec 2026-11-01 22:44:58 +01:00
FredApps 4d8eede62a Merge pull request #5472 from Piohrun/feat/mono-jbig2
M11: Monochrome Images reads JBIG2 scans: averaged like any, and stored again as JBIG2 (optimize.mono-compression)
2026-11-01 22:44:16 +01:00
FredApps 2850d52825 Merge pull request #5471 from Piohrun/feat/mono-indexed-polarity
M11: Monochrome Images averages indexed black-and-white images, the palette saying which sample is dark (optimize.downsample-images)
2026-11-01 22:43:06 +01:00
Eric Kaden 0d80c48e70 Move the sign-tab setup out of page_tool_input to keep it within the complexity limit 2026-11-01 16:41:29 -05:00
FredApps d35be6fdac fix(ui): use the shared rail viewport fix (#5677) 2026-11-01 22:40:04 +01:00
FredApps 99e63d4238 Merge pull request #5461 from Piohrun/feat/redact-jbig2
M8: redaction clears the covered pixels of JBIG2 scans instead of removing them (protect.redact-image-pixels)
2026-11-01 22:39:07 +01:00
FredApps a87c4fb6b7 M8: redaction stores again without them the images that share a redacted JBIG2 image's globals, so the globals leave the file (protect.redact-image-pixels)
A JBIG2 image's /JBIG2Globals hold the symbol dictionary of every image that
shares them (jbig2enc -s and most scanners give one to all of a scan's pages),
so the bitmaps of marks drawn only under a redaction stayed in the file while
another page's image used them. Every image using the globals of a removed or
replaced image (or of one in a removed or replaced form) is now decoded and
stored again in place as Flate without them; a full save then drops them. One
that can't be decoded for certain refuses the redaction
(RedactError::SharedJbig2Globals). Report::images_restored counts them.
2026-11-01 22:14:52 +01:00