Preflight is a native macOS utility for checking a PDF against practical submission
constraints before sending it. When a PDF exceeds the selected exact byte limit,
Preflight can also create a separate, locally optimized PDF at or below that limit
when its preservation checks permit. It never changes the selected source document.
Requirements
- macOS 14 or later.
-
On-device explanations and guideline drafting additionally require macOS 26 with
Apple Intelligence enabled; every other feature runs on macOS 14.
Everything Preflight can do
- Choose a local PDF with the file picker or drag and drop it into the app.
- Choose or drop 2–100 PDFs for deterministic, sequential batch inspection under a frozen profile.
- Review accessible batch totals and stable per-file rows, cancel an item or the run, optimize only oversized eligible PDFs into a chosen folder, and export a non-overwriting JSON or CSV batch receipt.
- Compare a PDF's exact byte size with an email-attachment or custom limit.
- Save up to 100 named submission profiles locally, then select, update, or delete them without re-inspecting a loaded PDF.
- Check page count against an optional custom maximum.
- Determine whether every page contains searchable text.
- Identify locked or encrypted documents.
- Warn when page dimensions are inconsistent.
- See pass, warning, and failure results with observed values, requirements, and suggested next steps.
- Review a private, local Recent Activity list of up to 100 past scans — file names without paths, outcomes, and per-check details — retained until cleared. Scans superseded by a new selection finish in the background and appear there.
- On macOS 26 with Apple Intelligence enabled, generate an on-device explanation of what the PDF is about, composed exclusively of verbatim passages independently verified against the PDF's own text. Explanations are held in memory only, never written to disk, and can be revisited from a scan's Recent Activity entry during the same session.
- Import a publisher-guidelines PDF to draft requirement values with cited supporting excerpts, extracted in a sandboxed helper process with no file access, and applied only after your review.
- Use Optimize to Fit whenever the source exceeds the active profile's exact byte ceiling — it appears only then.
- Choose among honest, curated Balanced, Aggressive, and Lossless Only optimization modes; every output candidate still passes the same preservation and exact-byte verification before export.
- Save up to 50 named optimization presets locally, then select, update their curated mode, or delete them. Presets store settings only; they never change the active submission profile's target byte size.
- Create a new, user-selected PDF using bounded PDFKit/Quartz candidates, preserving page geometry and searchable text.
- See the final output verified independently, with exact original, output, target, and savings byte counts.
- Run single-file inspection or exact-byte optimization from Shortcuts, including user-created Finder Quick Actions.
- Reverify both files against their recorded SHA-256 hashes before opening a side-by-side comparison whose current page and zoom level stay synchronized. (The panes do not synchronize pixel-level scrolling.)
- Export a versioned JSON verification receipt with filenames (not paths), exact byte counts, SHA-256 hashes, the selected profile and preflight snapshot, optimization strategy, and verification flags.
- Cancel safely — or see Preflight refuse to export — when no verified candidate can meet the target. Cancellation before the final atomic rename creates no output; once that commit succeeds, Preflight reports success and keeps the new output even if cancellation arrived at the same instant.
Shortcuts and Finder Quick Actions
After installing and launching Preflight once, open Apple's Shortcuts app and search
for Preflight actions. Two single-file actions are available:
- Inspect PDF with Preflight takes one PDF and
returns a text dialog containing the inspection status and findings. It does not
create a file.
- Optimize PDF Under Size takes one PDF and a
positive Target size in bytes (for example,
5000000 for
a 5 MB decimal-byte ceiling). It returns one independently verified PDF, or fails
without returning an output when no safely preserved candidate fits.
For an optimization shortcut, add Apple's Save File action
immediately after Optimize PDF Under Size and pass the Preflight
action's result to it. Choose a fixed destination or enable Ask Where to
Save. This step is required to keep the returned PDF: Preflight returns it
from app-owned temporary storage and does not save it into the source folder.
Preflight never modifies the source.
To make a Finder Quick Action:
-
In Shortcuts, create a shortcut whose input is Files from Finder and add one of the Preflight actions. Set its PDF
parameter to Shortcut Input.
-
For optimization, set Target size in bytes, then add Save File using the optimized PDF as its input.
-
Open the shortcut's Details, enable Use as Quick Action, and
enable Finder if Shortcuts presents that option.
-
Select one PDF in Finder and run the shortcut from the contextual Quick Actions menu (or the Services menu, depending on macOS
settings).
These are Shortcuts-based, user-configured Quick Actions — not a bundled native
Finder extension. The Preflight actions accept one file per invocation; use
Shortcuts' Repeat action for multiple files. They do not traverse folders or provide
hot-folder automation.
Housekeeping: whenever Preflight prepares another Shortcut output, it opportunistically
removes its own output directories older than seven days — but only when they still
contain exactly the single optimized PDF it created; anything unexpected is retained
conservatively. macOS may reclaim temporary storage sooner, so always keep results
with Save File.
Side-by-side comparison
After a successful optimization, Preflight can open the original and the output side
by side. Before the comparison opens, both files are reverified against their
recorded SHA-256 hashes, and the two panes keep the current page and zoom level
synchronized (they do not synchronize pixel-level scrolling). Comparison copies and
verifies each PDF asynchronously first, and preview is limited to 256 MB per PDF to
bound memory and parsing work; optimization and receipt export remain available
above that limit.
How optimization protects your files
Optimization never modifies the source and never overwrites or removes the requested
final destination. Export stages the verified candidate in a cryptographically
random, owner-only hidden directory beside your chosen destination, holds
descriptors through verification, and publishes the output with a single exclusive
atomic rename — the commit point. Cancellation observed before that rename creates
no output; a rename that wins a cancellation race is kept and reported as a success.
If Preflight can no longer prove a staging entry is the one it created, it
deliberately leaves a hidden artifact rather than risk deleting another process's
file. This is namespace hardening, not a defense against an attacker with permission
to inspect and continuously race every filesystem operation in the destination
directory.
Under the hood
Preflight is built with Swift 6, SwiftUI, and PDFKit, and runs inside the macOS App
Sandbox. A framework-light core holds document facts, submission profiles, checks,
and a deterministic evaluator; guideline-PDF text is extracted in a separate
sandboxed helper process with no file access; and the evaluator, inspection,
optimization hardening, batch processing, explanation grounding, and history
persistence are all covered by the app's test suite.
Privacy
Inspection, optimization, comparison, receipt export, Shortcuts actions, profile
settings, and optimization presets are local-only. Preflight has no network
functionality and does not collect data. The full policy is at trolls.dev/preflight-privacy.