Commit Graph
6827 Commits
Author SHA1 Message Date
Eric Kaden 257c843eed Forms: doc comments for the functions this change touches 2026-10-19 23:39:31 -04:00
Eric Kaden 9da056e00e Forms: a later XFA script reads the highlight an earlier one set 2026-10-19 23:32:16 -04:00
Eric Kaden 1ef0c1b948 Forms: a background form's highlight request applies at once 2026-10-19 23:20:41 -04:00
jonathanwxh-cell 4ff9bd6634 fix(render): cover all color spaces, padding and align /L policy with content crate (#3107) 2026-10-20 11:15:45 +08:00
Eric Kaden 98d9310309 Forms: app.runtimeHighlight, and XFA layout:ready scripts run on opening 2026-10-19 22:59:10 -04:00
jonathanwxh-cell d03dbd742e Merge remote-tracking branch 'upstream/main' into fix/inline-image-ei-in-samples 2026-10-20 10:54:57 +08:00
jonathanwxh-cell 1c7ad8e465 fix: merge current main into optimizer compatibility branch 2026-10-20 10:52:38 +08:00
Eric Kaden c90afe54cf M6: say why a form's Save opens Save As 2026-10-19 22:22:03 -04:00
Brandon ThomasandClaude Opus 5.5 6fb6b7cf6f Release 0.10.0
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-19 22:21:10 -04:00
Eric Kaden 0d0cce1bb0 Forms: Highlight fields marks only the fields that can be filled 2026-10-19 22:19:30 -04:00
djmushin 39d0b953ca M6: treat imported MaxLen zero as unlimited 2026-10-19 22:03:50 -04:00
djmushin 0ba01a0557 M6: optimize AcroForm JavaScript snapshots and diffs 2026-10-19 22:03:49 -04:00
hcchung1 570e6c0564 fix(automation): an emptied paragraph does not pass its number to an overlapping neighbour (#2516) 2026-10-20 10:02:06 +08:00
hcchung1 3909bebeec M7: a paragraph number keeps naming the paragraph text_paragraphs listed (#2516)
Paragraph numbers are positions in a list regrouped from geometry after
every edit, so an edit that merged a paragraph into its neighbour made the
next edit by number rewrite another paragraph and lose its text.

After text_paragraphs, text_edit and text_edit_layout find the listed
paragraph again by its text and box, and refuse one that no longer exists on
its own (list the page again). An edit's result names the numbers that are
gone in stale_paragraphs. The inline editor's switch-paragraph click holds
the same key instead of an index. Without a listing a number is a position,
as before. An identity that survives save and reopen is still #2508.
2026-10-20 10:02:06 +08:00
Eric Kaden 9366af3bad M6: side panels have fixed automation ids, and the parity note says where Print works 2026-10-19 22:01:10 -04:00
Eric Kaden 35e04743d0 M12: showing an XFA subform leaves its unnamed hidden objects hidden 2026-10-19 21:27:47 -04:00
Osvaldo Duran MelendezandClaude Sonnet 5.5 61ccfa237b Attachments: keep the bookmark rows doc comment on its function
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-19 21:08:24 -04:00
Osvaldo Duran MelendezandClaude Sonnet 5.5 39a9a6d2ca Attachments: report the added file's own key; drop an emptied indirect /Names
attachment_add compared every attachment name, including files attached to pages as comments, so a page comment with the same file name made the reported key empty. It now compares only the document-level name-tree keys. Deleting the last document attachment when the catalog's /Names is an indirect dictionary left an empty /Names behind; it is now removed from the catalog, as the direct case already did.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-19 21:08:21 -04:00
Eric Kaden 74326b455c M6: a field's own script may not open Save As 2026-10-19 21:02:37 -04:00
Eric Kaden e8eb840ec5 M6: form buttons show the side panels (execMenuItem ShowHide…) 2026-10-19 20:59:14 -04:00
Tiago KielandClaude Opus 5.5 3b6d344eb5 fix(render): find comma-below letters by character (refs #1666)
A font naming a Latvian comma-below letter by its code point (/uni0136) or by
the glyph list's name for it (/Kcedilla, /Gcedilla...) still drew nothing:
the name resolves to the cedilla name the glyph list prefers, which the
composite table does not hold. The thirteen comma-below letters are now
looked up by character, which also replaces the special case for U+021A and
U+021B. T and t with a cedilla (U+0162, U+0163) are not in that table and
keep their cedilla.

Raised by CodeRabbit on the PR.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-19 20:51:29 -04:00
Eric Kaden eaf977b4ab M6: a resting pointer leaves a drop-down's highlight to the keys 2026-10-19 20:16:30 -04:00
jonathanwxh-cell a10c0d8937 Merge branch 'upstream/main' into fix/typed-signature-winding 2026-10-20 08:15:30 +08:00
MichaelandClaude Sonnet 5 1ce4965c27 fix: read the last array of a surplus-operand TJ, not the first (#3569)
`[(FIRSTARR)] [(LASTARR)] TJ` is malformed (TJ takes one array
operand), but the operator still shows the one immediately before it,
as the renderer, MuPDF and pdftotext agree. Three readers here counted
operands from the front instead and showed the discarded first array:

- crates/edit/src/text.rs (text_lines/text_paragraphs, and the Office
  export through reading_lines)
- crates/redact/src/interp.rs (search-based redaction's content
  interpreter)
- crates/a11y/src/headings.rs (autotagged heading detection)

So the editor could offer a word the page never draws, a redaction
search could miss it, and a heading could read as text nobody sees.
Take the last array for TJ in all three, matching the `_ =>
op.operands.last()` arm already used for Tj/'/" alongside it.

Added a regression test per crate (`a_tj_with_a_surplus_array_reads_
the_last_one`, `a_tj_surplus_arrays_undrawn_glyphs_are_not_seen_
under_a_mark`, `a_heading_with_a_tj_surplus_array_reads_the_one_the_
page_draws`), confirmed each fails without its fix and passes with it.
cargo test -p pdfcraft-edit (196 passed) -p pdfcraft-redact (81
passed) -p pdfcraft-a11y (44 passed), fmt, clippy -D warnings, xtask
layers and xtask assets all clean.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-10-20 08:09:59 +08:00
Eric Kaden 98b292ac2b M6: drop a drop-down test the page-scroll one covers 2026-10-19 19:51:54 -04:00
Eric Kaden acd8a5765c M6: an open form field keeps the arrow keys, Home and End from moving the page 2026-10-19 19:45:29 -04:00
Eric Kaden 2169530273 M6: the mouse wheel scrolls a drop-down's list wherever the pointer is on it 2026-10-19 19:37:32 -04:00
ffishmanandClaude Opus 5.5 0a56784df8 M9: read .p7b/.p7c certificate bundles for trust import
load_certificates now reads PKCS #7 certificate bundles (degenerate
SignedData, RFC 5652 §5.2) in DER and as PEM PKCS7/CMS blocks, the way
Windows, Acrobat and certificate authorities export chains. PEM END
lines must match their BEGIN label.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-10-19 20:32:37 -03:00
Tiago KielandClaude Opus 5.5 8708cbb93d style(render): rustfmt the comma-below test (refs #1666)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-19 19:25:14 -04:00
Tiago KielandClaude Opus 5.5 88735a7003 fix(render): draw comma-below letters in non-embedded standard fonts (refs #1666)
The stand-ins for the standard fonts (PDFium's Foxit fonts) have neither the
comma-below letters nor a commaaccent glyph, and the composite-letter patch
left comma accents out. A non-embedded font naming /scommaaccent therefore
drew nothing, which is the blank "si" left in Romanian XFA forms, and
/tcommaaccent drew a cedilla through the glyph list's alias to U+0163.

Romanian s/S/t/T and Latvian k/K/l/L/n/N/r/R/G with a comma below are now
built from the letter and the font's comma, scaled to three quarters and set
just under the baseline, moved back along the slant in italics. The uni021A and
uni021B names of T and t with a comma below, which the glyph list
does not name, resolve by code point. Lowercase g with its turned comma above
is still not built.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-19 19:25:14 -04:00
vangel76 7504799e05 M6: align secured-form highlight tests after rebase (#2273) 2026-10-20 01:11:01 +02:00
vangel76andClaude Sonnet 5.5 f295be1e05 Tests: field highlights are on by default, so the toggle reads "Hide field highlights" (#2273)
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-20 01:10:07 +02:00
vangel76andClaude Sonnet 5.5 280f2439ec Preferences: field highlights on by default, with a toggle in Appearance (#2273)
New settings start with Highlight fields on. A stored choice is kept; a missing or
malformed value falls back to on. Preferences > Appearance gets the checkbox.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-20 01:10:07 +02:00
vangel76andClaude Sonnet 5.5 8239f9c4ed Optimize target_bytes: keep zip/retain image encoding on retries, only tighten ppi
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-20 00:55:51 +02:00
Eric Kaden 5d1303d12e M6: a drop-down's list follows the pointer and the keys, with a classic scroll bar 2026-10-19 18:27:36 -04:00
Eduardo Soares b175965766 Parity: limit the drop focus claim to path-bearing drops (#1620)
Byte-only drops (no filesystem path) have nothing for tab_showing to
match and open another tab, pinned by
opening_documents_without_a_path_still_open_twice; the drag-drop-open
note claimed focus for "a dropped document that is already open"
without that limit.
2026-10-19 19:21:59 -03:00
Eduardo Soares 6840b0fc32 Tests: wait for the vanished file's tab before deleting it (#1620)
The harness window is live, so open_path hands the read to the background
worker and run_steps(2) could not promise the worker had finished: under
load the file could be deleted before it was read, failing the test with
"no second tab". wait_until polls for the tab the way the drop tests
already do. Proven by delaying the worker 300 ms: the old test fails at
views.len() == 0, this one passes.
2026-10-19 19:21:55 -03:00
Eric Kaden 034a1080b0 M6: a long drop-down list keeps its scroll bar in view 2026-10-19 18:17:04 -04:00
Osvaldo DuranandClaude Opus 5.5 e76adf812a Merge upstream main ec0a9650 into pr/attachments
Conflicts: crates/automation/tests/automation.rs (code resolved by hand: crates/automation/tests/automation.rs). Catalogs keep upstream's rows, then this branch's rows upstream lacks; ATTRIBUTION.toml is upstream's with every sha256 recomputed; progress lines keep both sides, upstream's first.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-19 18:03:56 -04:00
Eric Kaden 42f09c156c M6: a drop-down shows its arrow, and its list looks like the field 2026-10-19 17:56:58 -04:00
Eric Kaden 0ca7fb9be9 M5: a button caption's characters its font's encoding can't hold are reported 2026-10-19 17:25:19 -04:00
Eric Kaden 3a5bcbdf97 M12: a date typed by another of an XFA field's edit patterns is kept in its first 2026-10-19 17:21:08 -04:00
Eduardo Soares 99fd06a8d7 Merge remote-tracking branch 'upstream/main' into 1620-focus-open-tab
# Conflicts:
#	crates/ui-egui/src/control.rs
#	crates/ui-egui/src/lib.rs
#	crates/ui-egui/tests/control.rs
#	parity/acrobat-features.toml
2026-10-19 18:06:36 -03:00
Eric Kaden 24a45db045 M5: leave measuring form text in its own font to #2900 2026-10-19 16:59:50 -04:00
PerchAnton 3326882463 M4: use fixed-size slices in named destination regressions 2026-10-19 23:54:13 +03:00
Eric Kaden bf88255c15 Merge remote-tracking branch 'upstream/main' into fix/xfa-date-bind-picture 2026-10-19 16:52:36 -04:00
PerchAnton cc22faca2f M4: keep large named destination trees usable on page deletion 2026-10-19 23:47:18 +03:00
oracola91 ffe99c192d fix(sign): eContentType must be data, and both content types must be OIDs
A content-type attribute value or an eContentType that was not an OID
was read as missing, which skipped the check that the two match. Such a
CMS is now not read, and neither is one without an eContentType.

A PDF signature's eContentType must also be data. With a content-type
attribute this already follows from the checks on the attribute.
Without one, a signature whose eContentType named another type could
still validate as a signature of the document. It is now invalid.

The PDF test now covers a wrong eContentType and a repeated
content-type attribute, and the README says that a missing
content-type attribute is read anyway, with a note.
2026-10-19 23:45:45 +03:00
oracola91 4f56e18103 fix(sign): one content type and one message digest in the signed attributes
RFC 5652 allows one content-type and one message-digest attribute in
the signed attributes, each with one value. The parser kept the last
attribute and the first value, so a CMS with two of either could mean
one thing here and another in a different reader. Such a CMS is now
not read.

The content-type attribute must also name the type of the encapsulated
content. The signature covers the attribute but not eContentType, so a
CMS where the two differ is not read either.
2026-10-19 23:38:58 +03:00
Eric Kaden 86e44dc6d5 M6: util.scand reads dates as another viewer does 2026-10-19 16:36:47 -04:00