Crop PDFs in browser or portable app
Wuqiong Zhao's pdfcrop Web App is sublimely fit to purpose. Tried wrangling a Tauri-based portable Windows app out of it with Claude 4.6 Opus, Gemini 3.1 Pro, and GPT 5.4 over several hours with little to show for it.
Dear friend and AI whisperer Josh adroitly conjured up a wonderful solution using Copilot & GPT-5.4-high in a twinkling, even fixing crop-box handle resizing along the way:
Successfully tested the following build steps in Windows 11 24H2 ARM64, macOS 26.4.1 Tahoe, and Ubuntu Linux 22.04:
1. Install prerequisites
Windows
- Git
- Visual Studio 2026 (select "Desktop development with C++")
- Rust
- Node.js
- wasm-pack (
wasm-pack-init.exe) - LLVM/Clang
winget install LLVM.LLVM --source wingetset PATH=C:\Program Files\LLVM\bin;%PATH%
macOS
macOS offers native PDF cropping in Preview.
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"brew install wasm-packcurl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | shsource "$HOME/.cargo/env"brew install node
Linux
sudo apt install build-essential pkg-config libwebkit2gtk-4.1-dev libayatana-appindicator3-dev librsvg2-dev libssl-dev llvm clangcurl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | shsource "$HOME/.cargo/env"curl https://rustwasm.github.io/wasm-pack/installer/init.sh -sSf | shsudo apt install nodejs npm -y
2. Configure Rust
rustup target add wasm32-unknown-unknown
cargo install tauri-cli --locked
3. Clone and enter the repo
git clone https://github.com/citricguy/pdfcrop.github.io-tauri/
cd pdfcrop.github.io-tauri\pdfcrop\examples\pdfcrop.github.io
4. Install JS dependencies
npm install
5. Build WASM package
wasm-pack build --target web --release --out-dir pkg
6. Compile the app
npm run desktop:build
In Windows, find pdfcrop-desktop.exe (~5MB) in src-tauri\target\release\. To build for x64 & x86 under ARM64:
rustup target add x86_64-pc-windows-msvc
cargo tauri build --target x86_64-pc-windows-msvc
rustup target add i686-pc-windows-msvc
cargo tauri build --target i686-pc-windows-msvc
Related
- Cropping PDFs
- Optimizing PDFs for E Ink displays
- Batch crop a stack of visually overlaid images like Briss
- Delete content cropped from PDFs in Preview
- Tauri false positives
❧ 2026-04-10