100 Commits
Author SHA1 Message Date
Dylan M. Taylor d2916decb3 packaging: use [[ for bash tests (SonarCloud S7688) (#6932)
Behaviour-preserving: `[[ ]]` in place of `[ ]` for bash tests (SonarCloud shell:S7688). Every script has a bash shebang; no test uses `-a`/`-o`, escaped parentheses or an unquoted pattern on the right of `=`. `bash -n` passes on each script; the rest is left to CI.

- `packaging/freebsd/package.sh`
2026-11-10 19:19:40 -05:00
Dylan M. Taylor 25f3f5429c fix(cos): remove duplicate decoded_strict_within that broke main after #6046 (#6934) 2026-11-10 19:08:05 -05:00
Dylan M. Taylor 9345b5caaa cos: drop the second decoded_strict_within that #6046 merged in (#6933)
main fails to compile (E0592): the merge of #6046 added Stream::decoded_strict_within next to the one already there. Both decode the whole chain bounded by max and map the error to CosError::Filter; the earlier one stays, with #6046's test.
2026-11-10 18:54:55 -05:00
Dylan M. Taylor ad3e6d4b85 fix(optimize): bound each unused-resource decode by the remaining shared budget (#6046) 2026-11-10 17:53:58 -05: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
Dylan M. Taylor 910b326774 fix(render): the named-destination index spends key bytes from one allowance (#6097) 2026-11-09 18:21:13 +08:00
Dylan M. Taylor ce3c1ef805 fix(sign): chain building hashes a certificate once for all candidate issuers (#6096) 2026-11-09 18:20:57 +08:00
Dylan M. Taylor 3a900b8bd2 fix(a11y): auto-tagging bounds the content it plans across all pages (#6090) 2026-11-09 18:20:34 +08:00
Dylan M. Taylor 14ae96a2ac fix(print): a printed page's form shares the page's Resources when it adds no appearance (#6089) 2026-11-09 18:20:18 +08:00
Dylan M. Taylor 01c132a6bf fix(xfa): strip reads a shared indirect Kids array once (#6081) 2026-11-09 18:20:02 +08:00
Dylan M. Taylor 237838102e fix(xfa): existing-field traversal shares a field's name among its queued children (#6080) 2026-11-09 18:19:46 +08:00
Dylan M. Taylor f64c853a3a fix(forms): comb detection ignores repeated boxes (#6077) 2026-11-09 18:19:30 +08:00
Dylan M. Taylor 5f4003e562 fix(engine): summarizing comments requires copying permission (#6039) 2026-11-09 18:19:15 +08:00
Dylan M. Taylor 3a1a2272fe fix(xfdf): FDF comment export excludes source pages by identity, not by /Type (#6036) 2026-11-09 18:18:59 +08:00
Dylan M. Taylor ce1cd80477 fix(xfa): remember every picture hash written in a pass (#6035) 2026-11-09 18:18:44 +08:00
Dylan M. Taylor 4791327701 fix(engine): unknown permissions on an encrypted document refuse copying and printing (#6011) 2026-11-09 18:18:28 +08:00
Dylan M. Taylor b3793789f6 fix(create): bound a PNG's frame buffer by what its bytes can hold; no truncating JP2 box lengths (#6007) 2026-11-09 18:18:11 +08:00
Dylan M. Taylor 1e25260337 fix(sign): read OCSP responseStatus as ENUMERATED; drop redundant RSA leading zeros (#6005) 2026-11-09 18:17:54 +08:00
Dylan M. Taylor 25025fa271 Merge pull request #6674 from dotCooCoo/chore/craft-update-1b34eba41
Updates: take craft-update from craft-libs main at 1b34eba41
2026-11-08 23:30:05 -05:00
Dylan M. Taylor fac631cd02 Updates: handle RestartToUpdate response 2026-11-08 23:00:08 -05:00
Dylan M. Taylor 74e1e40e67 fix(a11y): heading titles decode their source strings within a shared allowance (#6049) 2026-11-09 08:42:24 +08:00
Dylan M. Taylor 9642ed6f87 fix(sign): read each existing DSS stream once and within a decoded-size allowance (#6040) 2026-11-09 08:42:09 +08:00
Dylan M. Taylor ee6ae8eac4 fix(engine): coalesce script resetForm requests and bound console output per edit (#5975) 2026-11-09 08:41:24 +08:00
Dylan M. Taylor afaaaa6415 fix(print): index page labels once and cap how many pages a range selects (#5967) 2026-11-09 08:41:04 +08:00
Dylan M. Taylor ae21773fef fix(edit): stop rescanning what a loop already holds in wrapping, grouping and flattening (#5963) 2026-11-09 08:40:50 +08:00
Dylan M. Taylor a55eaa90e3 fix(redact): prune the resources of Forms a surviving Type 3 glyph draws (#5924) 2026-11-09 08:40:35 +08:00
Dylan M. Taylor eaeffa748b fix(measure): charge snapping per filter stage and bound listing work (#5920) 2026-11-09 08:40:21 +08:00
Dylan M. Taylor 87139acf2c fix(create): image export checks a JPEG's Extended XMP chunks before decoding it (#5860) 2026-11-09 08:39:52 +08:00
Dylan M. Taylor da5a664276 review: keep reading queued forms after one that will not decode 2026-11-08 11:14:23 -05:00
Dylan M. Taylor 5aaa8186fd Merge pull request #6375 from dylanmtaylor/land-sign-remaining
sign: land the still-valid parts of #6358, #5187 and #5173
2026-11-05 22:00:25 -05:00
Dylan M. Taylor 9afa126653 Merge pull request #6364 from benandez/fix/sign-p1-only-invisible-timestamps
sign: under no-changes certification, only invisible document timestamps may follow
2026-11-05 19:51:52 -05:00
Dylan M. Taylor 102cae3bef Merge pull request #6361 from benandez/fix/sign-classify-by-signed-role
sign: classify changes by signed object role
2026-11-05 19:28:33 -05:00
Dylan M. Taylor d22641a875 Pass the Linux signing key to the release workflow (#6200) 2026-11-04 17:44:52 -05:00
Dylan M. Taylor 03a16ddea6 fix(forms): AFSimple_Calculate folds field values as it reads them, within an allowance 2026-11-04 04:56:35 +00:00
Dylan M. Taylor 48b95e6494 fix(a11y): annotation checks and form tagging stop copying shared annotation data 2026-11-04 04:07:59 +00:00
Dylan M. Taylor 8bb0528bed Merge pull request #6078 from storytold/rel-0.18.1
Release: PdfCraft v0.18.1
2026-11-03 22:15:19 -05:00
Dylan M. Taylor 98845f1786 Release: PdfCraft v0.18.1
Bump the workspace version for the release that moves the craft-i18n pin
to 575cfde, serving the latest interface translations.
2026-11-03 21:51:23 -05:00
Dylan M. Taylor 446ca94617 Merge branch 'main' into fix/sec-print-text-up-once 2026-11-03 17:23:05 -05:00
Dylan M. Taylor 801fd3aa67 fix(engine): decode signature preview images within a small work allowance (#5981)
* fix(engine): decode signature preview images within a small work allowance

* style: rustfmt
2026-11-03 15:10:02 -05:00
Dylan M. Taylor 76260bb6a5 fix(xfa): scripts come only from the XDP's own packets and quote the date pattern (#5987)
The template (and the saved form state) was found anywhere under the XDP root, so a
template-shaped element inside imported datasets could supply the form and its event
scripts. A date field's pattern went into AFDate_FormatEx/KeystrokeEx string literals
unescaped.
2026-11-03 14:33:41 -05:00
Dylan M. Taylor ecdd1e658c fix(audit): read content one operator at a time and charge hidden text and findings (#5875)
The faux-redaction audit held every operator of a page's content and of each
form XObject in a vector before walking it, so a stream of millions of short
operators (compressed to a few kilobytes) was materialised whole within the
page's decode budget. Each Do and gs also copied the whole XObject or ExtGState
table to pick one entry, and each annotation listed in /Annots was deep-copied
before its subtype was read.

The walk now reads operators one at a time through pdfcraft_content::ops,
borrows resource tables and annotation dictionaries through the resolved Arc,
charges a hidden line's text bytes (padding included) against the comparison
bound once per cover, and charges each finding's record against the output
bound, so a shared annotation list on many pages or withheld text cannot grow
the finding list for free.
2026-11-03 10:30:12 -05:00
Dylan M. Taylor c251b3a0a7 fix(redact): read inherited forms once for all names in resource cleanup
unlink_doomed and unlink_from_forms asked, name by name, whether the
remaining content still draws an XObject, and each question parsed the
content and decoded every form without /Resources of its own again. A
holder with many aliases of one removed image, drawn by a large
inheriting form, multiplied that decoding by the number of aliases.

names_drawn now works out once per content which names it draws,
directly or through such forms (each read once), and whether any of it
could not be read; every alias is answered from that set. A name not in
the set while something could not be read still fails closed.
2026-11-03 15:28:23 +00:00
Dylan M. Taylor 8bec097af7 fix(print,engine): read the page tree once when finding which pages' text reads up 2026-11-03 11:46:35 +00:00
Dylan M. Taylor 97260514e6 fix(create): write a new document's page tree once (#5865)
Create PDF added each page to the page tree through Document::update_dict, which copies the tree's dictionary and its whole /Kids array, so a text of many form feeds took quadratic time: 40,000 pages took 108 s in a debug build. Pages are now collected and /Kids and /Count are written once, for blank, image and text documents.
2026-11-02 23:36:51 -05:00
Dylan M. Taylor 359ed56ffa fix(redact): structure titles go with the descriptions of removed content (#5866)
Redaction and hidden-content removal cleared /Alt, /ActualText and /E from
the structure element owning removed marked content, but kept its /T title,
which producers often fill with the element's text. Ancestor cleanup and
in-place description detection shared a constant that also omitted /T, while
annotation removal had its own list that included it.

One DESCRIPTIONS policy (Alt, ActualText, T, E) now serves the owning
element, its ancestors, in-place detection and annotation removal.
2026-11-02 23:34:18 -05:00
Dylan M. Taylor 69ddcd89bf fix(redact): rewritten form XObjects drop /PCAdded (#5868)
Page content streams rewritten by redaction or hidden-content removal
already dropped /PCAdded, the source text of an added item, but a form
XObject whose content was rewritten kept its original dictionary,
/PCAdded included, so the removed text stayed readable in the saved file.
2026-11-02 23:31:39 -05:00
Dylan M. Taylor 661ded72bb Merge pull request #5748 from Combiler01/fix/single-page-zoom-scroll-lock-5713
fix(ui): prevent wheel lockup at edge in non-continuous view (#5713)
2026-11-02 22:59:04 -05:00
Dylan M. Taylor 7ca642980a docs: sync Craft App Suite list with ArtCraft Launcher 2026-11-01 12:29:59 -05:00
Dylan M. Taylor 47f42ba07b ci: grant packages write permission to release workflow 2026-10-31 23:43:03 -04:00
Dylan M. Taylor 13655d0992 packaging(flatpak): add OCI image build and GHCR publishing helper (#5526) 2026-10-31 15:33:25 -04:00
Dylan M. Taylor f137a289ba Merge pull request #5522 from aiongg/docs-tidy
docs: tidy agent, contributor and asset docs
2026-10-31 01:06:25 -04:00
Dylan M. Taylor 4a5f9ced2d Merge pull request #5527 from aiongg/update-result-dialog
Updates: shared check-result dialog from craft-update
2026-10-31 01:05:42 -04:00
Dylan M. Taylor ec33924e80 fix(flatpak): allow reading launcher version pins (#5490)
* fix(flatpak): allow reading launcher version pins

* fix(flatpak): allow reading launcher version pins
2026-10-30 20:12:04 -04:00
Dylan M. Taylor 1d1cbc4ec9 UPD.1: honor app pretend versions in update checks (#5397) 2026-10-30 02:35:18 -04:00
Dylan M. Taylor 3517d05b47 Update prompt shows the app icon and accent color instead of a letter (#5388)
UPDATE_APP (native builds; craft-update is a native-only dependency) carries our 128 px icon and accent (#b70228, its red, from the icon (#5245)). The updater, the self-update
helper and craft-update's startup prompt all get them through crate::UPDATE_APP; the
prompt draws the icon, the accent and "by ArtCraft" (craft-update's default developer).

craft-update is pinned to storytold/craft-libs main at 1065653e7 (#434).
Clippy fixes for Rust 1.99 in untouched code (same logic):
- crates/edit/src/images.rs
- crates/forms/src/appearance.rs
2026-10-30 01:27:58 -04:00
Dylan M. Taylor f76dbb9e8c deps: bump tar, zip, roxmltree, rustls-webpki and symphonia to their latest versions (#5381)
- `zip`: 9.1.0 → 9.1.3

Requirement `roxmltree` 0.20 → 0.21: `ParsingOptions` gained `entity_resolver` (initializers take `..Default::default()`, i.e. none, as before) and is no longer `Copy` (two functions build it with a closure, the pattern merge.rs already used).
2026-10-29 22:21:27 -04:00
Dylan M. Taylor 834a4daf9c CI: workflows only call craft-common-actions at @main (#5378)
AGENTS.md (and CLAUDE.md where present) gets a CI workflows section: workflows only call
craft-common-actions at @main, with no other jobs; feature and fix PRs don't touch CI and
link or open a craft-common-actions issue (a PR only for a small fix that is safe for
every app and does not increase CI time); legacy jobs
aren't added to and move only as their own task, staying until a shared workflow runs them.

windows-arm64.yml moves from its SHA pin to @main. The pinned revision is on
craft-common-actions main and the workflow (and the actions it calls) is identical
there, so nothing changes in behaviour.
2026-10-29 22:10:15 -04:00
Dylan M. Taylor 726ecf2625 packaging: Flatpak finds and prints to CUPS printers (#5346)
* packaging: Flatpak finds and prints to CUPS printers

The Print dialog listed no printers in the Flatpak: the runtime has libcups but not
lpstat/lp, the sandbox couldn't reach the CUPS socket, and driverless network printers
(lpstat -e) need Avahi. Bundle lpstat/lp/lpoptions from CUPS 2.4.20 (Apache-2.0,
statically linked, licence installed) and grant --socket=cups and
--system-talk-name=org.freedesktop.Avahi in both manifests.

* packaging: Flatpak reads the user's CUPS settings (~/.cups, read-only)

Review (CodeRabbit): without it the sandbox's lp/lpstat ignore the user's default
printer and saved options (lpoptions) and a print server named in their client.conf.

* packaging: Flatpak CUPS tools reach the host socket when client.conf names a custom path

Review: Flatpak mounts the host's CUPS socket at /var/run/cups/cups.sock whatever
path ~/.cups/client.conf or CUPS_SERVER names, so lp/lpstat/lpoptions now run through
a wrapper that points a socket path missing in the sandbox there. Server names
(remote servers) and sockets that exist are left alone. Tested in the sandbox:
CUPS_SERVER=/run/custom/cups.sock lists the host's printers through the wrapper and
none without it; a host name is passed through unchanged.

* packaging: redirect a custom CUPS socket only when it is the one Flatpak mounted

Review (CodeRabbit): Flatpak picks the socket it mounts at /var/run/cups/cups.sock
with stricter rules than CUPS (flatpak-run-cups.c: a socket CUPS_SERVER, else the
first line spelled exactly "ServerName /path" in ~/.cups/client.conf, else the
default), while CUPS reads the keyword in any case and takes the last ServerName. The
wrapper now redirects only when CUPS' socket is the one Flatpak chose, so a job can't
reach a different server; otherwise CUPS fails on the missing path.

* packaging: never redirect a CUPS_SERVER the sandbox was given

Review (CodeRabbit): Flatpak picks the socket it mounts from the host's CUPS_SERVER,
so one set by flatpak run --env or an override may not be what it mounted. The
wrapper now leaves any CUPS_SERVER alone and redirects only a client.conf socket that
matches Flatpak's choice; otherwise CUPS fails on the missing path instead of
reaching a different server.

* packaging: point CUPS at the mounted socket only when it is the one Flatpak chose, else fail

Review (CodeRabbit): with a custom socket listed first and the default last in
~/.cups/client.conf, Flatpak mounts the custom one at /var/run/cups/cups.sock while
CUPS picks the last line, finds that path, and talks to the custom server. The
wrapper now compares CUPS' socket with Flatpak's choice even when the path exists:
equal, CUPS is pointed at the mount; different, the tool fails with an error instead
of reaching another server.
2026-10-29 18:48:45 -04:00
Dylan M. Taylor c735fb7da5 Make PdfCraft's app color red (#5245)
* Make PdfCraft's app colour red

The icon tile, the Windows PDF file icon's badge and lines, the DMG background and the README
badges move from green #12a58a to crimson #b70228 (darker shade #8a011e, fold #f3cfd6).
Every PNG, .ico and .icns is re-rendered from the edited master SVGs with packaging/icons.sh
and resvg 0.47; the .icns is written with Pillow because iconutil is macOS-only, with
iconutil's size set. The DMG background is re-rendered with generate.py; its .DS_Store is
unchanged. ATTRIBUTION.toml hashes updated; cargo xtask assets passes.

* Fix OCR model attribution hashes
2026-10-29 12:13:07 -04:00
Dylan M. Taylor 7555be3c7e Honor CARGO_BUILD_TARGET in FreeBSD packaging for aarch64 release builds (#5205)
The script already validated CARGO_BUILD_TARGET and named the archive after the arch, but
cargo build ignored it, so a cross build compiled for the host. Pass --target, resolve
host-tuple to the build host's triple first, and skip the --version smoke run for any
CARGO_BUILD_TARGET build (an aarch64 binary cannot run on the x86_64 VM).
2026-10-28 15:48:56 -04:00
Dylan M. Taylor 67d4f18179 Grant network access so update checks can reach GitHub (#5189) 2026-10-28 13:17:18 -04:00
Dylan M. Taylor 3932ee0639 Enforce Rust coding standards via Clippy (#4897)
* Refactor annot for strict Clippy checks

* Refactor automation for strict Clippy checks

* Refactor cos for strict Clippy checks

* Refactor edit for strict Clippy checks

* Refactor engine for strict Clippy checks

* Refactor export for strict Clippy checks

* Refactor forms for strict Clippy checks

* Refactor js for strict Clippy checks

* Refactor organize for strict Clippy checks

* Refactor pdfcraft-cli for strict Clippy checks

* Refactor preflight for strict Clippy checks

* Refactor print for strict Clippy checks

* Refactor redact for strict Clippy checks

* Refactor render for strict Clippy checks

* Refactor sign for strict Clippy checks

* Refactor ui canvas for strict Clippy checks

* Refactor ui commands for strict Clippy checks

* Refactor ui dialogs for strict Clippy checks

* Refactor ui support for strict Clippy checks

* Refactor ui tools for strict Clippy checks

* Refactor ui workflows for strict Clippy checks

* Refactor xfa for strict Clippy checks

* Refactor xfdf for strict Clippy checks

* Enforce workspace Clippy standards and document lint policy

* Fix menu overflow and form pointer handling

* Group annotation, form and document operation parameters

* Group signing and timestamp validation inputs

* Group demo form field properties

* Group UI interaction and rendering parameters

* Restore translated security and shortcut labels

* Fix platform-gated imports for Windows and wasm builds

* Qualify signing calls for macOS and Windows builds

* Restore the preflight check flow and the overflow menu title
2026-10-27 20:51:13 -04:00
Dylan M. Taylor e4966354ee Restore the preflight check flow and the overflow menu title 2026-10-28 00:21:28 +00:00
Dylan M. Taylor ad95afb0f8 Qualify signing calls for macOS and Windows builds 2026-10-28 00:21:27 +00:00
Dylan M. Taylor ef894ae6b8 Fix platform-gated imports for Windows and wasm builds 2026-10-28 00:14:57 +00:00
Dylan M. Taylor 76ce895478 Restore translated security and shortcut labels 2026-10-27 23:33:26 +00:00
Dylan M. Taylor 31833c992d Group UI interaction and rendering parameters 2026-10-27 23:25:40 +00:00
Dylan M. Taylor 775d6a4a19 Group demo form field properties 2026-10-27 23:25:40 +00:00
Dylan M. Taylor 5fecdb9cee Group signing and timestamp validation inputs 2026-10-27 23:25:40 +00:00
Dylan M. Taylor 81c63c037a Group annotation, form and document operation parameters 2026-10-27 23:25:39 +00:00
Dylan M. Taylor 63bc58a3d5 Fix menu overflow and form pointer handling 2026-10-27 23:16:56 +00:00
Dylan M. Taylor d95ff3898d Enforce workspace Clippy standards and document lint policy 2026-10-27 23:12:52 +00:00
Dylan M. Taylor 92bc2f9acd Refactor xfdf for strict Clippy checks 2026-10-27 23:12:52 +00:00
Dylan M. Taylor 9530dbb3e8 Refactor xfa for strict Clippy checks 2026-10-27 23:12:52 +00:00
Dylan M. Taylor 2ca92751cf Refactor ui workflows for strict Clippy checks 2026-10-27 23:12:52 +00:00
Dylan M. Taylor 21cae663d1 Refactor ui tools for strict Clippy checks 2026-10-27 23:12:52 +00:00
Dylan M. Taylor 2d27306a8d Refactor ui support for strict Clippy checks 2026-10-27 23:12:52 +00:00
Dylan M. Taylor bf89bf918c Refactor ui dialogs for strict Clippy checks 2026-10-27 23:12:52 +00:00
Dylan M. Taylor f796c71abe Refactor ui commands for strict Clippy checks 2026-10-27 23:12:52 +00:00
Dylan M. Taylor e7a60f2fd4 Refactor ui canvas for strict Clippy checks 2026-10-27 23:12:52 +00:00
Dylan M. Taylor 074d4f3111 Refactor sign for strict Clippy checks 2026-10-27 23:12:51 +00:00
Dylan M. Taylor a11909551d Refactor render for strict Clippy checks 2026-10-27 23:12:51 +00:00
Dylan M. Taylor 33e23da8a9 Refactor redact for strict Clippy checks 2026-10-27 23:12:51 +00:00
Dylan M. Taylor bc89733725 Refactor print for strict Clippy checks 2026-10-27 23:12:51 +00:00
Dylan M. Taylor c043c82531 Refactor preflight for strict Clippy checks 2026-10-27 23:12:51 +00:00
Dylan M. Taylor 530e2a2645 Refactor pdfcraft-cli for strict Clippy checks 2026-10-27 23:12:51 +00:00
Dylan M. Taylor f40a57878b Refactor organize for strict Clippy checks 2026-10-27 23:12:51 +00:00
Dylan M. Taylor a0598816d2 Refactor js for strict Clippy checks 2026-10-27 23:12:51 +00:00
Dylan M. Taylor 4965e23bfe Refactor forms for strict Clippy checks 2026-10-27 23:12:51 +00:00
Dylan M. Taylor 5e75b9c3e6 Refactor export for strict Clippy checks 2026-10-27 23:12:51 +00:00