100 Commits
Author SHA1 Message Date
FredAppsandFredApps 4f23ee1c1c test(rename): separate filename and full-path boundary fixtures (#7965)
* test(rename): separate filename and full-path boundary fixtures

* Preserve repository LF endings in rename test fixtures

* Preserve UTF-8 text in rename fixture repair

---------

Co-authored-by: FredApps <[email protected]>
2026-11-20 16:16:33 -05:00
FredApps 1feb7c3f05 Merge pull request #7147 from indy2kro/fix/7010-active-pane-edge-under-menus
fix(ui): split view's active-pane line is drawn under open menus (#7010)
2026-11-20 21:46:33 +07:00
FredApps b50a17f717 Merge pull request #7180 from rezaprama/fix/redact-unreadable-annotations
fix(redact): refuse annotations with unreadable bounds
2026-11-20 21:04:09 +07:00
FredApps c05499f707 Merge pull request #2923 from regendorf-ux/pr/tab-rename
Rename the open file from its tab (Rename… and double-click), with names that work on every system (#2102, #2867)
2026-11-20 21:03:47 +07:00
FredApps 6de83353bd Merge pull request #7916 from dotCooCoo/fix/fonts-embedding-test-stream
Fonts: the embedding tests import Stream
2026-11-20 09:16:43 +07:00
FredApps 5b8cb8ab61 Merge pull request #7830 from storytold/fix/pptx-parity-20261119
Restore plain PPTX tables and shared-writer regression checks
2026-11-19 08:12:39 +07:00
FredApps 21a9d8b1be Merge pull request #7825 from FredApps/test/button-script-completion
test(ui): await native button-script completion
2026-11-19 07:36:44 +07:00
FredApps 60ca578c37 test(ui): await native button script completion 2026-11-19 00:37:30 +01:00
FredApps 3bc2adbe28 Merge pull request #7805 from FredApps/ci/gate-cleanup-budget-778
ci: allow native gate cleanup to finish
2026-11-19 05:29:14 +07:00
FredApps 56f19a32c0 Merge pull request #7811 from FredApps/test/startup-password-completion-order
test: avoid racing startup password completion order
2026-11-19 04:32:05 +07:00
FredApps f9bfa19e74 test: keep startup password assertions independent of worker order 2026-11-18 21:26:45 +01:00
FredApps bad6ac7fa2 Merge pull request #7779 from FredApps/chore/778-xfa-merged-pin
Use merged XFA namespace and BOM safety fixes
2026-11-19 00:57:14 +07:00
FredApps fe16ea4834 fix(xfa): classify shared namespace admission as too large 2026-11-18 18:07:30 +01:00
FredApps 39b3f45a9d Merge current main to validate the #778 dependency pin with baseline repairs 2026-11-18 17:07:47 +01:00
FredApps 6d95958ccc Use merged XFA namespace and BOM safety fixes 2026-11-18 16:08:32 +01:00
FredApps 64c10d450c Merge main into onee/fix-annot-tests 2026-11-18 19:51:06 +07:00
FredApps 562c428c6f test(annot): retain current opacity and review-state semantics (#7721)
* test(annot): retain current opacity and review-state semantics

* style: wrap fixture imports at repository width
2026-11-18 19:08:31 +07:00
FredApps e56b03fbae test(annot): assert URL scan work instead of wall-clock speed (#7695) 2026-11-18 17:41:12 +07:00
FredApps 2d2c2f7e18 fix(xfdf): retain canonical Cargo lock package order (#7698) 2026-11-18 17:39:57 +07:00
FredApps f8211b6aaf Merge main into onee/fix-annot-tests 2026-11-18 17:14:34 +07:00
FredApps ae30592466 Update annotation tests after SaveOptions, Style, LinkAction, and Shape changes
#2523's tests were written against earlier field lists. Later work added
id_entropy, border and opacity style fields, a zoom on page links, and a
line on custom stamps, so cargo xtask ci now fails at clippy on main.

The tests keep the same intent: page links still use Fit Page, the view they
had before they carried a zoom, and the extra style and stamp fields take
their defaults.
2026-11-18 16:55:06 +07:00
FredApps a49949388b fix(test): allow the unused mut on Windows in the private test folders (#7595)
#5923 made the pptx LibreOffice test and the staging tests build their
folders with a DirBuilder that only Unix sets a mode on. On Windows the
binding is never changed, so -D warnings stops the build with unused_mut
and main's Windows gate is red.
2026-11-17 05:52:32 +01:00
FredApps efd265563e Merge pull request #7330 from MMexicann/patch-8
docs(prc-render): name the current craft-prc parser dependency
2026-11-16 17:20:43 +01:00
FredApps 412e6963b5 Merge pull request #7529 from storytold/onee/778-pdf-content-facade
refactor(content): re-export craft_pdf::cos::content
2026-11-16 14:54:16 +01:00
FredApps 3d43364928 fix(crypt): write RC4 fixtures through the legacy entry points
Pinning craft-pdf to the #1852 merge SHA also picked up d74e60b2, which
makes create() and set_encryption() refuse RC4-40 and RC4-128. Tests,
helpers and the protect example that still write those schemes now use
create_legacy and set_encryption_legacy. Edit::Protect does the same
when the chosen algorithm is legacy, so a file that must stay readable
by a reader without AES can still be written.
2026-11-16 14:11:36 +01:00
FredApps 99ef606491 refactor(content): point the facade at craft-pdf #1852
Pin craft-pdf to 8e03cd016d42032b867fef6bad86bc69bf2c1920 and re-export
craft_pdf::cos::content. Other craft-libs pins stay on e2dc681a3.
2026-11-16 13:42:15 +01:00
FredApps f9aca964b1 refactor(content): re-export craft_pdf::cos::content
The parser, serializer and matrices now live in craft-pdf (craft-libs#1852,
pin 8e03cd016d42032b867fef6bad86bc69bf2c1920). pdfcraft-content becomes a
facade, like pdfcraft-cos. The unit tests moved with the implementation;
hayro_sign_tokens stays here. Other craft-libs pins are unchanged.
2026-11-16 13:42:01 +01:00
FredApps 207a50ef13 Merge pull request #7344 from MMexicann/patch-20
test(create): fail explicitly for invalid one-bit RGB fixtures
2026-11-16 12:33:12 +01:00
FredApps 9d061a7668 Merge pull request #3762 from AdrianTM/feat/comments-panel-shortcut
Ctrl+M opens the Comments panel (#3741)
2026-11-16 11:51:05 +01:00
FredApps 75a6ce50c3 Merge pull request #7377 from gmrmad1/docs/roadmap-2026-11-15
docs: bring ROADMAP.md and parity assessment current through 2026-11-15
2026-11-16 10:23:45 +01:00
FredApps 923dd9f593 Merge pull request #7449 from storytold/extract/shared-export-base64
export: replace local Base64 encoder with existing craft-mime
2026-11-16 07:42:08 +01:00
FredApps a0bc1b3477 Revert "xfa: avoid rescanning prototype-only child lists"
This reverts commit 5410dc1c. The XFA prototype-walk optimization is
unrelated to the #778 Base64 cutover; keep it for its own PR with a
measured benchmark (craft-libs#778 consumer PRs stay single-purpose).
2026-11-16 06:53:25 +01:00
FredApps 1c7b507a24 Merge pull request #7475 from storytold/extract/shared-signature-verification
sign: replace local signature verification with existing craft-pkcs7
2026-11-16 06:42:14 +01:00
FredApps 070432ca44 i18n: move the craft-i18n pin to 866aff71 (#7417)
Pick up craft-i18n main, including French menu paths that use ">"
instead of "▸" (#296) and Portuguese (Brazil) byte-unit rows in the
shared catalog (#205).
2026-11-15 12:23:39 +01:00
FredApps c944f106dd Merge pull request #7350 from christianlappin/fix/7175-update-download-test
Tests: keep the update download test stable in Linux coverage
2026-11-15 01:06:17 +01:00
FredApps b5327e03f6 Merge branch 'main' into fix/7175-update-download-test 2026-11-15 00:04:42 +01:00
FredAppsandFredApps 2524889a6b i18n: move the craft-i18n pin to e56d262 (#7319)
* i18n: move the craft-i18n pin to e56d262

Brings in the translations merged to craft-i18n since the last pin.
The flatpak manifests name the same commit.

* i18n: read the newer catalog's rows in three UI tests

The craft-i18n pin brings French rows for the hotbar settings button and
its search field, a reworded German password warning, and French rows
that keep the source's menu-path arrow. The hotbar and script-prompt
tests now take those strings from the catalog. The font coverage test
still checks every letter, and skips a symbol only when the row's English
text has it too.

---------

Co-authored-by: FredApps <[email protected]>
2026-11-14 22:26:17 +01:00
FredApps 961bda29f1 CI: preserve font notice regressions through shared gate (#7218) 2026-11-14 22:26:12 +01:00
FredApps 1a5cf6b023 fix(ui): distinguish insert text annotation icon (#7170) 2026-11-14 22:26:03 +01:00
FredApps 5f8cc76cd0 fix(create): export JPEG images behind stream filters (#7168) 2026-11-14 22:25:58 +01:00
FredApps 54b91598a3 Move selected comments together with arrow keys (#7165)
* Move selected comments together with arrow keys

* Test keyboard nudging of selected lines

* test(ui): cover locked and duplicate nudge selections
2026-11-14 22:25:50 +01:00
FredApps 346d803080 Merge pull request #7203 from christianlappin/fix/7050-macos-save-xattrs
Fix macOS saves for PDFs with extended attributes
2026-11-14 17:13:09 +01:00
358e33a307 M7: replacing a line keeps the source font for the words it can show (#2378, re-lands #2955) (#6842)
* M7: replacing a line keeps the source font for the words it can show (#2378) (#2955)

* Fit #2955's line edit to #4514's /ActualText spaces

Since #4514, source_show wraps a run whose spaces the subset lacks in a
/Span /ActualText BDC ... EMC, so the moves standing in for those spaces
read back. #2955's two-font /PCEdLine path writes its source runs through
source_show, so they now carry that span too. Three of its tests were
written against the operator stream from before that:

- replacing_a_mixed_font_line_again_replaces_its_sequence counted BMC and
  EMC as the /PCEdLine sequences alone. It now also counts each edit's
  own /ActualText spans (BDC, and EMC = sequences + spans), so a sequence
  that nests or survives a re-edit still fails it.
- a_leading_space_does_not_make_a_source_font_run looked for the leading
  move right after the Tf; it now sits inside the run's span.
- a_row_replaced_inside_a_shared_sequence_starts_in_its_own_font put its
  second row before the first EMC, which is now the span's: the row was
  read as part of the span's text. It now goes before the EMC that closes
  /PCEdLine, the case the test describes. A paragraph rewrite drops an
  /ActualText span with its line (the span's BDC and EMC are among the
  line's operators), so it never leaves a row inside one.

The code needs no change: re-editing drops the spans inside a /PCEdLine
sequence with it (BDC/EMC are in the dropped set), and a span's merged
run keeps the sequence it is in, so the line still reads back as one.
Also drops the same_font import lines.rs no longer uses.

* Tests: fit #2955's three line-edit tests to #4514's /ActualText spans

* Tests: the replaced sequence's check allows the new text's own /ActualText span

---------

Co-authored-by: mtlcl410 <[email protected]>
Co-authored-by: FredApps <[email protected]>
2026-11-14 13:25:27 +01:00
FredApps dd6c625274 Merge pull request #4417 from FredApps/fix/sonar-fonts-quality-gate
fix(ci): use pinned fonts for Sonar coverage
2026-11-14 12:16:14 +01:00
FredApps 616c71492d Merge branch 'main' into fix/sonar-fonts-quality-gate 2026-11-13 20:43:14 +01:00
FredApps 0f22627bff Merge pull request #7144 from FredApps/port-2081
Link JavaScript actions and app.openDoc (port of #2081)
2026-11-13 19:47:48 +01:00
FredApps 0aed40d670 Merge branch 'main' into port-2081 2026-11-13 19:45:32 +01:00
FredApps c83c9ddb90 Merge pull request #7202 from Ethunxxx/fix/recent-reveal-test-race
test(ui): run the Home recent Reveal test inline so its toast check can't race
2026-11-13 19:45:11 +01:00
FredApps 2a639868dd Merge branch 'main' into port-2081 2026-11-13 18:59:56 +01:00
FredApps 8034990072 Merge pull request #7141 from FredApps/fix-openssl-ia32cap
fix(startup): an OPENSSL_ia32cap naming a missing CPU feature no longer stops PdfCraft (#2916)
2026-11-13 17:31:17 +01:00
FredApps ec31c55763 fix(ocr): main builds on Windows again: the executable check is its own function per platform (#7222)
Since Rust 1.100, clippy's needless_bool refused program_is_executable on Windows: with the
#[cfg(unix)] block gone it read if ... { return false; } true, and the Windows gate failed on
every main commit since 13 Nov 09:38. The check is now one expression with the platform part
in has_execute_permission; behaviour is unchanged on every platform.
2026-11-13 16:28:29 +01:00
FredApps e6730be289 test: scope CPU override regressions to supported platforms 2026-11-13 14:08:57 +01:00
FredApps fd4d60ff4a CI: use the shared git-sources check (#7042)
ci.yml ran its own copy of the git-sources job; it now calls
craft-common-actions git-sources.yml, under the same full-ci label rule.
2026-11-13 14:04:39 +01:00
FredApps 0c15e3de71 Merge pull request #7115 from jonathanwxh-cell/fix/measure-compound-number-formats
fix(measure): read compound and fractional measurement number formats (ISO 32000-2 12.9.2)
2026-11-13 10:38:39 +01:00
FredApps 623c53f887 Merge pull request #7073 from mtlcl410/fix/test-moddate-second-boundary
fix(tests): saves compared byte for byte don't fail when the clock crosses a second between them
2026-11-13 10:37:57 +01:00
FredApps eb2a2eddac Merge pull request #7056 from mtlcl410/perf/form-edit-reads-fields-once
M7: a form edit reads the document's fields once (form.fill-text)
2026-11-13 10:37:09 +01:00
FredApps a080e1ff27 Merge pull request #7053 from mtlcl410/fix/lone-sign-token
fix(hayro-syntax): a lone sign in a dictionary or array is unreadable, not a panic
2026-11-13 10:32:49 +01:00
FredApps 6d2c006f02 Merge pull request #7051 from mtlcl410/fix/js-session-test-worker-cap
fix(js): each unit-test thread counts its own document script workers
2026-11-13 10:29:31 +01:00
FredApps 330cde8035 Merge pull request #5559 from vangel76/feat/recent-reveal-5452
Reveal recent files in the system file manager from Home (#5452)
2026-11-13 02:19:00 +01:00
FredApps ad153f5ded test(ui): the link test's openDoc path is absolute on Windows too 2026-11-12 21:22:55 +01:00
FredApps feec1853c0 Merge main into port-2081
Main now has page actions, timers and layers (#6985) and shared text
allowances for inspection (#6015). Conflicts:
- render/inspect/annotations.rs: main's collect_link (which notes
  JavaScript even when the link isn't listed) takes this branch's link
  script budget and its once-only warning; push_link is gone.
- automation form_tools.rs, js tests.rs, docs/acroform-script-workflows.md:
  both sides added at the same place; both kept.
Adapted to main: the link runner's Job gets `timer: None`, and, as a
button's script does, the document's layers and the fields as page
actions and timers show them (live_state).
2026-11-12 20:53:37 +01:00
FredApps be9fe433cc Merge pull request #6985 from FredApps/port-4751
feat: LaTeX animate playback — page actions, timers, getOCGs, view-only overrides (port of #4751)
2026-11-12 20:30:31 +01:00
FredApps 8c99ec4e08 CI: nightly release dry run (#7040)
release.yml also runs nightly on main with craft-common-actions' dry-run: every release build
except macOS, with nothing signed, pushed or drafted. Breakage that only the release build hits
(riscv64, Flatpak, FreeBSD, packaging) then shows up the next morning instead of on release
day, as it did on 11 Nov 2026.
2026-11-11 23:04:31 +01:00
FredApps 3650f01f23 Release: PdfCraft v0.21.0 (#6995) 2026-11-11 17:58:30 +01:00
FredApps 2c39b1d625 Merge pull request #6882 from Piohrun/fix/redact-unparsed-bytes
M8: redaction refuses a page whose content it can't fully parse
2026-11-11 14:40:29 +01:00
FredApps 96590430d4 Merge pull request #6935 from Piohrun/feat/optimize-mono-past-80-megapixels
M11: Optimize stores one-bit images and masks past 80 million pixels as monochrome images
2026-11-11 14:38:39 +01:00
FredApps 203c4fd8fa Merge pull request #6927 from Piohrun/fix/redact-marked-content-last-operands
M8: redaction reads an operator's operands from the end, as the renderer does
2026-11-11 14:38:05 +01:00
FredApps 209bb40d88 Merge pull request #6886 from Piohrun/fix/redact-form-matrix-by-reference
M8: the redaction walk reads a form's /Matrix entries by reference
2026-11-11 14:37:09 +01:00
FredApps 825ba80eac Merge pull request #6860 from Piohrun/fix/redact-type3-check-first
M8: the Type 3 cleanup charges the page only when there is a Type 3 font
2026-11-11 14:36:10 +01:00
FredApps b363f7a717 Merge pull request #6825 from Piohrun/feat/optimize-mono-masks
M11: Optimize stores a picture's one-bit masks as monochrome images
2026-11-11 14:35:24 +01:00
FredApps 22974ca874 Merge pull request #6813 from Piohrun/fix/fonts-refusal-counted
M7: a font's metrics are past their allowance only when it refused a read
2026-11-11 14:34:48 +01:00
FredApps 43e3eb62bd Merge remote-tracking branch 'origin/main' into port-2081
# Conflicts:
#	crates/automation/src/a11y/form_tools.rs
#	crates/engine/src/lib.rs
#	crates/js/src/tests.rs
2026-11-11 13:32:54 +01:00
FredAppsandPeter Yatsyshin 80d7de6698 test(ui): keep the mouse-down button inside the window
Co-authored-by: Peter Yatsyshin <[email protected]>
2026-11-11 13:25:18 +01:00
FredAppsandLMatt08 12bc215e12 docs: link JavaScript actions and app.openDoc (#2081 port)
Co-authored-by: LMatt08 <[email protected]>
2026-11-11 13:12:58 +01:00
FredAppsandPeter Yatsyshin 0fba511e97 forms: a push button with only a mouse-down action takes the press
Widget.mouse_down records an /AA /D action, so a push button acting only on mouse down (the
LaTeX animate package's controls) is pressable and its press runs the action as Mouse Down
through the widget trigger dispatch, instead of saying it has no action.

Co-authored-by: Peter Yatsyshin <[email protected]>
2026-11-11 13:11:32 +01:00
FredApps c0f5f92b57 Merge remote-tracking branch 'origin/main' into port-4751
# Conflicts:
#	crates/automation/src/dispatch.rs
#	crates/automation/src/tools.rs
#	crates/forms/src/lib.rs
#	crates/js/src/tests.rs
#	crates/ui-egui/src/workflows/js_ui.rs
#	parity/acrobat-features.toml
2026-11-11 13:11:32 +01:00
FredAppsandDWAA1660 059dbd6e00 feat(forms): open, Will Save and Will Print actions, widget pointer/focus scripts, setItems/setAction/toSource (port of #344) (#6969)
* feat(js, forms): field setItems, setAction and a bounded toSource (#269)

Ported from #344 by @DWAA1660 onto the per-document script session.

- `field.setItems(items)` replaces a combo or list box's items (text, or
  [text, export] pairs). The value stays when an item still has it, and
  otherwise becomes the first item's. Written as the field's /Opt (pairs
  only where the export value differs), /I dropped, field redrawn.
- `field.setAction(trigger, script)` installs a JavaScript action for one
  trigger (MouseUp/Down/Enter/Exit, OnFocus/OnBlur, Keystroke, Validate,
  Calculate, Format), replacing only that trigger's action.
- `Object.prototype.toSource()` writes plain data (strings, numbers,
  booleans, null, undefined, arrays, objects) that eval reads back. It
  refuses functions, cycles, more than 64 levels, 10,000 values or 1 MiB
  with an error the script can catch.

Co-authored-by: DWAA1660 <[email protected]>

* feat(engine): run a form's open, Will Save and Will Print actions and its widgets' pointer and focus scripts (#269)

Ported from #344 by @DWAA1660 onto the per-document script session: each
runs in the document's retained realm, so state the document scripts and
earlier events left is kept.

- The catalog /OpenAction's JavaScript (and its /Next chain, bounded and
  cycle-safe; other action types skipped) runs once on opening, after the
  document scripts, for background opens and reloads too, and again on
  Revert in a fresh realm. Event Doc/Open.
- `Session::run_document_actions` runs /AA /WS (Will Save) or /AA /WP
  (Will Print). A failing action is reported and never stops the save or
  print. doc_save and doc_print run them first and report what they said
  (`will_save`, `will_print`).
- Scripts that run unasked (open, Will Save, Will Print, pointer over,
  focus) may only ask for highlight, zoom, focus or a page; a click's
  Mouse Down / Mouse Up keep their requests.
- `Session::field_trigger` runs a widget's Mouse Enter, Mouse Exit, Mouse
  Down, Mouse Up, Focus or Blur JavaScript (one undoable edit), reading only
  that widget's dictionary. `field_focus` now runs an AcroForm widget's On
  Focus / On Blur as well as XFA enter/exit.
- New tool `js_event`; form_focus's description says AcroForm focus
  scripts run too.

Co-authored-by: DWAA1660 <[email protected]>

* feat(ui): Will Save before saving, Will Print before printing, and widget pointer scripts in the app (#269, #247)

Ported from #344 by @DWAA1660.

- Save (both paths) runs the document's Will Save actions first, and Print
  its Will Print actions; what they change is saved or printed, and what
  they say is shown.
- The pointer moving onto or off a form widget queues its Mouse Enter /
  Mouse Exit script, a press its Mouse Down. A click on a check box or radio
  button queues its Mouse Up after the toggle, so the script reads the value
  the click stored (#247). The queue runs after the frame's edit.

Co-authored-by: DWAA1660 <[email protected]>

* docs(parity): document actions and widget triggers are partly supported (#269)

Co-authored-by: DWAA1660 <[email protected]>

* test: check toSource's text (scripts can't eval it) and the trigger event names (#269)

Co-authored-by: DWAA1660 <[email protected]>

* test: a check box's Mouse Up reads its new value; keep the fixtures on screen and the realm across an in-place save (#247, #269)

Co-authored-by: DWAA1660 <[email protected]>

* fix(engine, forms, js, ui): review fixes for document actions and field triggers

- widget trigger actions follow /Next, each action its own edit; errors don't stop the chain
- setAction installs on the field the object stands for when names repeat
- toSource refuses non-plain objects and a __proto__ key
- doc_print checks the destination before Will Print; js_event returns only its own output
- combo/list clicks run Mouse Up; a refused click's Mouse Up doesn't run
- label crops are re-read when Will Print changed the document

Co-authored-by: DWAA1660 <[email protected]>

* forms: run a pointer trigger on the field it hit and refresh the edited field's draft

A trigger now carries the field's object, so of fields sharing a name the one under the
pointer runs its own script (Session::field_trigger_target); js_event passes the field it
resolved. A trigger script changing the field being edited shows in its editor unless the
user already typed there, as focus scripts do.

Co-authored-by: DWAA1660 <[email protected]>

* forms: carry the field's identity through focus scripts and js_event

Focus transitions now track the field object, so moving between fields sharing a name is a
move and the field that gained or lost focus runs its own script
(Session::field_focus_target). js_event takes an optional field_id from form_fields to pick
one of fields sharing a name.

Co-authored-by: DWAA1660 <[email protected]>

---------

Co-authored-by: DWAA1660 <[email protected]>
2026-11-11 13:09:37 +01:00
FredAppsandLMatt08 c6646e3469 ui: clicking a JavaScript link runs its action; openDoc asks first
Ported from #2081 onto main's script prompt UI: a JavaScript link click starts the link's
action like a button's (menus and questions without blocking the window; a failed one
changes nothing); its tip reads "JavaScript action"; app.openDoc queues the existing
consent prompt for another PDF (web: unavailable). No new strings.

Co-authored-by: LMatt08 <[email protected]>
2026-11-11 13:07:19 +01:00
FredAppsandLMatt08 e47e9fbc5e automation: link_run_javascript, open_doc requests, links' JavaScript in doc_info
Ported from #2081 on main's ScriptSession: link_run_javascript runs a link's action with
ordered answers (as js_run takes them) and reports its requests without carrying them out.

Co-authored-by: LMatt08 <[email protected]>
2026-11-11 12:55:47 +01:00
FredAppsandLMatt08 52ca67c8c4 engine: run a link's JavaScript action in the document realm
Ported from #2081: Session::run_link_javascript / start_link_javascript run a link's action as
event Link/Mouse Up on its page, with the document as target, in the per-document
ScriptSession; a failed link commits no field change or request; read-only documents' links
run too. Field scripts may not open another document; resolve_javascript_document_path
resolves openDoc paths as remote-link paths (Acrobat /C/... paths on Windows).

Co-authored-by: LMatt08 <[email protected]>
2026-11-11 12:43:21 +01:00
FredAppsandLMatt08 d9c895a32f js: app.openDoc request, a link event's document target, empty popUpMenuEx
Ported from #2081: app.openDoc only queues Request::OpenDoc for the current document's
folder (the viewer asks first) and answers null; a Link event's target is the document;
a popup menu with no items answers null without asking.

Co-authored-by: LMatt08 <[email protected]>
2026-11-11 12:32:31 +01:00
FredAppsandLMatt08 6d03a7acdf render: read a link's JavaScript action as LinkTarget::JavaScript
Ported from #2081: link annotations whose action is JavaScript keep the script (up to 256 KiB
each, 4 MiB per document; larger ones are rejected and reported once).

Co-authored-by: LMatt08 <[email protected]>
2026-11-11 12:32:31 +01:00
FredAppsandPeter Yatsyshin 6805790536 test(js): assert! for a bool (clippy)
Co-authored-by: Peter Yatsyshin <[email protected]>
2026-11-11 11:46:10 +01:00
FredAppsandPeter Yatsyshin 65ea96da4c style: fmt and a type alias for clippy
Co-authored-by: Peter Yatsyshin <[email protected]>
2026-11-11 11:37:07 +01:00
FredAppsandPeter Yatsyshin 96bcdfec1a feat(automation): js_page and js_advance; parity and docs for page actions and timers (#169)
Co-authored-by: Peter Yatsyshin <[email protected]>
2026-11-11 11:24:39 +01:00
FredAppsandPeter Yatsyshin d9ced67896 feat(ui): run the reading page's actions and timers each frame; highlight skips push buttons (#169)
Co-authored-by: Peter Yatsyshin <[email protected]>
2026-11-11 11:22:32 +01:00
FredAppsandPeter Yatsyshin 17ae6ec9cd feat(engine): page actions and timers run in the document realm and change only the view (#169)
show_page runs a page's close/open actions, run_timers fires due timers (at most 16 a call),
next_timer and script_clock drive the viewer. Fields they show, hide or give another icon
are drawn so on screen only (screen_config); values and resets are undoable edits. A timer's
alerts and requests go to the console. getOCGs layer changes turn layers as the panel does.

Co-authored-by: Peter Yatsyshin <[email protected]>
2026-11-11 11:22:32 +01:00
FredAppsandPeter Yatsyshin 85020ab05f feat(render): view-only annotation visibility and appearance overrides (hayro-interpret patches 104, 105) (#169)
Co-authored-by: Peter Yatsyshin <[email protected]>
2026-11-11 10:49:37 +01:00
FredAppsandPeter Yatsyshin a0b4c88ba8 feat(forms): page_scripts reads a page's open/close actions and its annotations' page actions (#169)
Co-authored-by: Peter Yatsyshin <[email protected]>
2026-11-11 10:48:07 +01:00
FredAppsandPeter Yatsyshin e13d0a04ca feat(js): this.getOCGs lists the document's layers and ocg.state turns one (#169)
Ported from #4751 by @pyatsysh. DocInfo carries the layers; a run reports
the layers its script turned in Outcome::layers, for the viewer to show or
hide as the Layers panel does (the document isn't changed).

Co-authored-by: Peter Yatsyshin <[email protected]>
2026-11-11 10:40:17 +01:00
FredAppsandPeter Yatsyshin f56a146b22 feat(js): timers keep and fire in the document's script realm (#169)
Ported from #4751 by @pyatsysh onto #5699's per-document realm.

`app.setInterval` and `app.setTimeOut` (an expression or a function) are
kept by the retained realm and reported in every Outcome (`timers`); the
caller owns the clock and fires one by running a Job with `timer` set, in
the realm that set it. `clearInterval`/`clearTimeOut` forget one. Bounds
kept from #4751: at most 64 timers per document, periods of at least
10 ms. A one-off run keeps none (the functions return an inert object, as
before), and changed document scripts start a realm without the old
timers.

Co-authored-by: Peter Yatsyshin <[email protected]>
2026-11-11 10:39:13 +01:00
FredApps 235ede4896 Print: flatten transparent sheets for GDI (v3) printer drivers (#6155, #5838, #5940) (#6955)
* Print: flatten transparent sheets for GDI (v3) printer drivers

Windows sends a job for a GDI (v3) driver through its XPS-to-GDI
conversion, which fails on soft masks (#6155), prints halos around them
(#5838) or prints transparency as black boxes (#5940). XPS (v4) drivers
print the same pages correctly.

spooler_copy takes a flatten_transparency flag. With it, after greying
and before tiling, each sheet that uses transparency is replaced by an
opaque picture of itself (spooler::flattened): rendered at 300 dpi, lower
for a sheet past 80 MP or 16000 px a side, in tiles of at most
2000 x 2000 px, each an RGB Flate image over white, so no tile reaches
Windows' 2^22 px image cap and tiling leaves them alone. The sheet keeps
its boxes and rotation; its group and annotations go. Sheets without
transparency stay vector.

pdfcraft-preflight gets page_uses_transparency, the PDF/A transparency
search without counting a transparency group on its own, which Word
puts on every page.

Both callers pass false until the GDI-driver check lands.

* Print: flatten transparent sheets only for a GDI (v3) printer driver

spool::xps_driver / spool::gdi_driver read whether the printer's driver renders XPS itself,
through craft-print's new xps_driver (storytold/craft-libs#804, winprint
storytold/winprint.rs#21). The Print dialog and doc_print pass gdi_driver to spooler_copy's
flatten_transparency, so XPS (v4) drivers, PDF printers among them, keep vector sheets.

craft-print pinned to the craft-libs#804 branch, winprint to #21's, until they merge.

* craft-print 60ede99985ef1e5df87a2aca66ed538eb23dec99: craft-libs main with #804 (xps_driver), winprint bc06a7c4 (#21)

* Cargo.lock: the two winprint entries in Cargo's order (by source, after the re-pin)
2026-11-11 08:41:07 +01:00
FredApps 3ad707d07b Test: wait for the paper row before clicking Custom… while discovery is pending (#6925)
adding_custom_paper_overrides_pending_driver_default clicked Custom… as soon as the background
paper read started; on hosted macOS the dialog hadn't drawn its paper row by then and the test
failed (no node "Custom…"). It now waits for the button, up to 10 s, before clicking. Found by the
first nightly macOS run.
2026-11-10 23:14:40 +01:00
FredApps 1be1cfa6ed CI: the workspace's tests on macOS each night (and on demand) (#6921)
Pull requests and main run Linux and Windows only; release.yml builds and signs the macOS app
without running the tests, so macOS-only failures went unseen. On 10 Nov 2026 a hand-started run
found three (two print tests and a bates test, fixed in #6905 and #6913) plus one more
(min_window, fixed separately). One macos-latest leg a night, through the shared gate.
2026-11-10 22:13:16 +01:00
FredApps 85987baef0 Test: at the minimum width on macOS the main menu may be the folded Menu button (#6920)
The menu bar folds titles that don't fit into "⋯", or all of them into one "Menu" when not even
the first fits. On hosted macOS, at MIN_WINDOW_SIZE, the bar is the Menu button (the system font is
wider), so the test's File menu item wasn't there and it failed; the main menu is still reachable.
A real macOS window uses the native menu bar.
2026-11-10 21:51:38 +01:00
FredApps b10f85262c Test: the non-UTF-8 output-name probe test doesn't run on macOS (#6913)
output_probe_paths_preserve_non_utf8_names creates files named with bytes that aren't UTF-8.
APFS keeps only UTF-8 file names, so on macOS creating the probe fails before the check runs and
the test fails; no output can have such a name there. It runs on the other unix systems as before.
Found running the automation tests on hosted macOS.
2026-11-10 20:57:08 +01:00
FredApps 8e6ec925c8 macOS: a job that names no paper tray asks for Auto Select (craft-print 1ee01a4c, #3752) (#6905)
* macOS: a job that names no paper tray asks for Auto Select (craft-print 1ee01a4c, #3752)

craft-print 1ee01a4c (storytold/craft-libs#232) sends `AP_D_InputSlot=` on macOS for a job whose
options name no tray, as the system Print dialog's Paper Feed: Auto Select does. Without it CUPS
used the PPD's default tray, and a printer whose default tray is empty held every job while CUPS
reported it completed (the Xerox AltaLink in #3752).

- The Print dialog's driver options take the queue's defaults through craft-print's
  apply_queue_defaults: option and choice names match as CUPS matches them, and on macOS the
  paper tray starts on Auto Select, which is what the job sends.
- The two tests that pin the exact `lp` arguments expect the Auto Select option on macOS.

* Tests: on macOS a CUPS queue on its driver's default tray shows Auto Select (craft-libs#232)

instances_read_the_queue_ppd_and_their_own_defaults and
a_queue_that_never_answers_is_given_up_at_the_deadline expected the PPD's default tray; on macOS
apply_queue_defaults now offers Auto Select first and as the default there, which is what a job
naming no tray sends. Found by running the print tests on hosted macOS.
2026-11-10 20:17:41 +01:00
FredApps 0bffa42fc5 Merge pull request #6889 from Combiler01/fix/continuous-scrolling-default-6780
fix: Continuous Scrolling toggle not working in Preference tab (#6780)
2026-11-10 20:05:21 +01:00
FredApps b16cd32659 Print: a printer's remembered paper wins over its driver's default paper (#6906)
#5861 (#6100) reads the chosen printer's papers and default paper in the background, and the
default replaces the dialog's paper unless it was chosen in the dialog (paper_overridden). The
paper a printer's setup restores (#2001, #6779) didn't count as chosen, so on Windows the driver's
default replaced it each time the dialog opened: an office printer last printed on A3 came back
on A4.

apply_setup now marks the paper it restores as chosen. A test drives the dialog with a printer
remembered on A3 whose driver's default is A4.
2026-11-10 20:03:14 +01:00
FredApps 655aa92b5e Merge pull request #6100 from Combiler01/fix/paper-size-driver-5861
fix(print): auto-detect printer paper size and add page setup sync (fixes #5861)
2026-11-10 18:18:09 +01:00