Commit Graph
3339 Commits
Author SHA1 Message Date
huppifluppandClaude Opus 5.5 622625a178 M10: Enhance scanned file reports scans inside Form XObjects and names JPEG 2000
- A scan drawn only through grouped Form artwork is reported in skipped
  (once per form, with every page that draws it) instead of being counted
  as no scan; a Form of vector artwork holding only a small picture
  (under 36 dpi over its area) still counts as no scan.
- decode_samples checks the filter before the colour space and bit depth,
  so a JPEG 2000 image without /ColorSpace or /BitsPerComponent is
  reported as JPEG 2000, not as a colour-space or bit-depth problem.
- Optimize and Enhance scanned file no longer start while the other runs:
  they share the progress card and capture the same document state.
- docs/gaps.md: background and edge-shadow removal apply to grey and RGB
  scans, despeckle also to 1-bit ones.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-28 13:37:00 +01:00
huppifluppandClaude Opus 5.5 308d22cbad M10: Enhance scanned file cleans scanned pages in place
Scan & OCR ▸ Enhance scanned file (Acrobat's Enhance ▸ Scanned document)
now cleans up scanned pages: background removal (the camera clean-up's
level 0-100), edge shadow removal (book gutters, copier borders) and
despeckle, each its own switch.

The camera tool renders the page and replaces it with a picture, which
would drop a scan's invisible OCR text, comments and links. Instead each
scan image (pictures covering at least half the page, each at least a
tenth) is decoded, cleaned and written back into its own image object at
the same size and colour space: a JPEG stays a JPEG (quality 90), other
grey/RGB images are stored losslessly, a 1-bit image stays 1-bit with its
decode array, and every other dictionary entry (SMask, Interpolate, ...)
is kept. An image several pages share is cleaned once. What can't be
cleaned (CMYK, indexed, JPEG 2000, JBIG2, CCITT, colour-key masks, broken
data, oversized images) is reported, never skipped silently; pages that
are no scan are listed too.

The engine works as a job like Optimize (scan_clean_job, run on a worker
with progress and cancel, apply_scan_clean refuses a result for an older
document state) and applies one undoable step, "Enhance scanned file".
pdfcraft-optimize exposes decode_samples/encode_samples for in-place
pixel edits. camera_clean gains clean_samples for grey and RGB samples
with separate switches and an edge-shadow pass; the camera tool's output
is unchanged. page_enhance_scan drives it headlessly.

Not yet an option of Recognize text. Refs #4119.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-28 09:56:22 +01:00
aiongg 20eebc1c33 deps: pin craft-libs at e11f9d9a so Cargo before 1.99 loads craft-menu (#5094)
craft-libs#366 drops the default-features override on craft-keymap that
older Cargo rejects. FreeBSD aarch64 builds with Rust 1.98.1 and failed
with "no matching package named craft-menu found" (craft-libs#364).
2026-10-27 22:16:40 -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
Dylan M. Taylor 166f706e3e Refactor engine for strict Clippy checks 2026-10-27 23:12:51 +00:00
Dylan M. Taylor de73c35e17 Refactor edit for strict Clippy checks 2026-10-27 23:12:51 +00:00
Dylan M. Taylor 84c873d2e1 Refactor cos for strict Clippy checks 2026-10-27 23:12:51 +00:00
Dylan M. Taylor 9d97546081 Refactor automation for strict Clippy checks 2026-10-27 23:12:51 +00:00
Dylan M. Taylor 7d1ed99f51 Refactor annot for strict Clippy checks 2026-10-27 23:12:50 +00:00
aiongg 5af1027652 Merge pull request #4892 from Jeremy8776/feat/install-scope-policy
Windows installation policy: PdfCraft
2026-10-27 17:11:07 -04:00
aiongg dfb74c7990 ci: use storytold/craft-common-actions windows-arm64 workflow 2026-10-27 20:52:54 +00:00
aiongg e8955737e0 Merge storytold/pdfcraft main 2026-10-27 20:52:31 +00:00
aiongg 9e90b2a54d refactor(ui): use craft-ui's ComboBox for every dropdown (#4988)
* Use craft_ui::ComboBox so dropdown menus grow back (egui#5225)

* chore(deps): craft-libs 60d60d48 (dropdown fixes)

* chore(deps): craft-libs 6af63481 (dropdown fixes)

* chore(deps): craft-libs 4d7b82f7 (dropdown fixes)

* chore(deps): craft-libs 92d392cf (#387 merged)
2026-10-27 16:22:20 -04:00
aiongg 1889690bfa Merge pull request #5039 from Jeremy8776/fix/ocr-model-onnx-urls
Packaging: fetch OCR models from the ONNX URLs (legacy RTEN URLs return 403)
2026-10-27 15:57:22 -04:00
Jeremy bf353cb0d9 fix(installer): check the exact architecture-specific machine folder
The pre-signing check matched any folder named Program Files, so it rejected
a valid MSI when Windows resolves Program Files elsewhere, accepted the 64-bit
root for an x86 package and accepted a different app name. Build the expected
folder from the package architecture's resolved root and the policy name.
2026-10-27 19:13:37 +00:00
Kyle Kassen da8cea2b0b M10: reuse verified OCR model and packaging prerequisites 2026-10-27 18:54:41 +00:00
aiongg e9fc890a86 Merge pull request #5026 from Silvertree2010/perf/export-speed
perf(engine): export page images on worker threads (about 80% less wall time)
2026-10-27 13:42:21 -04:00
NetterSilverandClaude Opus 5.5 37bf4ee986 perf(engine): export page images on worker threads
Export > Image spent its time in the PNG, JPEG and TIFF encoders, one
page after another: on a 55-page manual at 150 dpi, drawing every page
took about 0.34 s and encoding it 1.1 s (PNG) to 2.0 s (JPEG).

Exporter::images exports a list of pages, drawing and encoding several
at once on worker threads, each with its own PageRenderer (as
automation's extract_parallel does), and hands the files to a sink in
page order on the calling thread. Workers draw at most one page ahead
of the sink and fewer run when 1 GiB can't hold that many of the
largest page. The first page or sink error stops the export with every
earlier page handed over, as before. A page panic becomes that page's
error, and a panicking sink stops the workers. One page, one core or
wasm keeps the per-page loop. Export > Image and the doc_export_images
tool use it.

Files are byte-identical. One core is left for the interface (at most
8 workers). With examples/export_bench, on a Ryzen with 16 threads
(shared), mean of two medians of 21 runs:
  PNG 150 dpi   1874 -> 340 ms  (-82%)
  JPEG 150 dpi  2106 -> 340 ms  (-84%)
  TIFF 150 dpi  2032 -> 375 ms  (-82%)
  PNG 300 dpi   3804 -> 590 ms  (-84%)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-27 17:41:38 +01:00
Jeremy 4580e5c294 fix(installer): resolve the wizard scope and folder correctly
Real msiexec runs (per-user and all-users, silent and wizard) found two defects
that the metadata fixtures cannot see:

- "Only for me" published ALLUSERS=2, so FindRelatedProducts treated the run as
  per-machine and skipped the existing per-user copy. An interactive upgrade
  left two registered products and uninstall left files behind. The page now
  leaves ALLUSERS unset for a per-user choice.
- Windows Installer resolves Program Files once, for the context it started in,
  so choosing "Everyone" in the wizard installed into the user profile with a
  machine-wide registration. The wizard now sets the new-install folder itself
  after the choice (Program Files, Program Files (x86) for 32-bit, or the
  per-user Programs folder). Silent installs are unchanged.

check-install-policy.ps1 now fails if either regresses.
2026-10-27 15:32:34 +00:00
Jeremy c56a4b3399 docs(installer): note that the 32-bit all-users folder is Program Files (x86); tidy wording 2026-10-27 12:25:20 +00:00
Jeremy 315e7fad66 docs(installer): describe the per-user default install location and scope 2026-10-27 12:09:03 +00:00
Jeremy c1670d0aa5 fix(installer): keep the desktop shortcut on a machine-wide update; harden install-policy checks 2026-10-27 12:01:39 +00:00