Commit Graph
4058 Commits
Author SHA1 Message Date
Eric Kaden 56b316a7f4 Forms: a radio group's read-only button can't be chosen by a click 2026-10-20 00:35:54 -04:00
Osvaldo Duran MelendezandClaude Sonnet 5.5 83227d343a Format with rustfmt
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-20 00:22:45 -04:00
Eric Kaden 0a77db066c Forms: a radio group's read-only button is left unhighlighted on its own 2026-10-20 00:20:02 -04:00
hcchung1andClaude Sonnet 5.5 acacf9485f fix(automation): hide_text_block resolves its number like text_edit, and a merged paragraph is not followed (#2516)
page_render's hide_text_block used the paragraph number as a position in the page's current
paragraphs, so after an edit regrouped the page it hid a different paragraph from the one
text_edit would rewrite. It now resolves the number against the text_paragraphs listing and is
refused when the paragraph is gone.

text_edit also accepted any overlapping paragraph that contained the requested text as the
edited one. When the edit merged the paragraph into a neighbour, the merged paragraph contains
that text too, so the number followed it and a second edit by that number dropped the
neighbour's text. The edited paragraph must now show exactly the requested text; a merged one
leaves the number stale.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-20 11:57:48 +08:00
Eric Kaden a3b942021f M12: doc comments, and words keeps its own 2026-10-19 23:46:56 -04:00
Eric Kaden 5cd7e816b9 M12: doc comments for the functions this change touches 2026-10-19 23:46:16 -04:00
Eric Kaden 24b55275a5 M12: doc comments for the functions this change touches 2026-10-19 23:46:14 -04:00
Eric Kaden a0ae8a3996 M6: doc comments for the functions this change touches 2026-10-19 23:43:02 -04:00
Eric Kaden 032febca2f M6: doc comments for the functions this change touches 2026-10-19 23:42:56 -04:00
Eric Kaden 77eb328c83 Forms: doc comments for the functions this change touches 2026-10-19 23:42:37 -04:00
Eric Kaden 15ab8c7a2c M12: doc comments for the functions this change touches 2026-10-19 23:42:22 -04:00
Eric Kaden 465bd0a717 M5: doc comments for the functions this change touches 2026-10-19 23:41:47 -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
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
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
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
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
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 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