A CLI tool that transforms PDFs to look like scanned documents.
Swift
102
19 commits
updated Feb 3, 2026
A CLI tool that transforms PDFs to look like scanned documents.
Ever been asked to "print, sign, and scan" a document? Sometimes you just need a PDF that looks like it passed through a physical scanner — with all the subtle imperfections that implies.
https://github.com/user-attachments/assets/ef722540-1156-4bc7-a9dd-b7c5dea7c8d3
scanify input.pdf
scanify --aggressive --bent --dusty input.pdf
brew tap Francium-Tech/tap
brew install scanify
git clone https://github.com/Francium-Tech/scanify.git
cd scanify
swift build -c release
cp .build/release/scanify /usr/local/bin/
Ubuntu/Debian:
# Install Swift (if not already installed)
# See https://swift.org/download for the latest version
wget https://download.swift.org/swift-5.9-release/ubuntu2204/swift-5.9-RELEASE/swift-5.9-RELEASE-ubuntu22.04.tar.gz
tar xzf swift-5.9-RELEASE-ubuntu22.04.tar.gz
sudo mv swift-5.9-RELEASE-ubuntu22.04 /opt/swift
echo 'export PATH=/opt/swift/usr/bin:$PATH' >> ~/.bashrc
source ~/.bashrc
# Install dependencies
sudo apt-get update
sudo apt-get install -y poppler-utils imagemagick
# Fix ImageMagick PDF policy (required)
sudo sed -i 's/rights="none" pattern="PDF"/rights="read|write" pattern="PDF"/' /etc/ImageMagick-6/policy.xml
# Build and install
git clone https://github.com/Francium-Tech/scanify.git
cd scanify
swift build -c release
sudo cp .build/release/scanify /usr/local/bin/
Fedora/RHEL:
# Install dependencies
sudo dnf install poppler-utils ImageMagick
# Fix ImageMagick PDF policy
sudo sed -i 's/rights="none" pattern="PDF"/rights="read|write" pattern="PDF"/' /etc/ImageMagick-6/policy.xml
# Then follow the build steps above
Arch Linux:
# Install dependencies
sudo pacman -S poppler imagemagick
# Then follow the build steps above
# Build the image
docker build -t scanify .
# Run
docker run --rm -v $(pwd):/data scanify /data/input.pdf /data/output.pdf
# Basic usage - creates input_scanned.pdf
scanify document.pdf
# Specify output path
scanify document.pdf scanned_output.pdf
# Aggressive mode - more noise, rotation, artifacts
scanify --aggressive document.pdf
# Bent paper effect - shadow band like curved paper
scanify --bent document.pdf
# Dusty scanner - random dust specks and particles
scanify --dusty document.pdf
# Combine options
scanify --aggressive --bent --dusty document.pdf
| Option | Description |
|---|---|
--aggressive | Apply stronger scan effects (more noise, rotation, artifacts) |
--bent | Add paper bend shadow effect (like curved paper under a scanner) |
--dusty | Add random dust specks and hair particles (like a dirty scanner glass) |
--version | Show version |
--help | Show help |
| Effect | Description |
|---|---|
| Paper darkening | Whites become slightly gray (scanned paper is never pure white) |
| Edge shadows | Vignette effect from scanner lid |
| Top shadow | Gradient shadow at top edge |
| Uneven lighting | Slightly off-center lighting variation |
| Noise/grain | Paper texture simulation |
| Slight blur | Optical imperfection |
| Random rotation | Paper feed misalignment |
| Saturation reduction | Scanner color limitations |
--aggressiveAmplifies all base effects for a more dramatic scan appearance:
--bentAdds a horizontal shadow band across the page to simulate paper that isn't perfectly flat on the scanner glass.
--dustyAdds random artifacts to simulate a dirty scanner:
pdftoppm and pdfinfo)convert and identify)MIT License - see LICENSE
Swift
98.8%
Dockerfile
1.2%
A CLI tool that transforms PDFs to look like scanned documents.
Swift
102
19 commits
updated Feb 3, 2026
A CLI tool that transforms PDFs to look like scanned documents.
Ever been asked to "print, sign, and scan" a document? Sometimes you just need a PDF that looks like it passed through a physical scanner — with all the subtle imperfections that implies.
https://github.com/user-attachments/assets/ef722540-1156-4bc7-a9dd-b7c5dea7c8d3
scanify input.pdf
scanify --aggressive --bent --dusty input.pdf
brew tap Francium-Tech/tap
brew install scanify
git clone https://github.com/Francium-Tech/scanify.git
cd scanify
swift build -c release
cp .build/release/scanify /usr/local/bin/
Ubuntu/Debian:
# Install Swift (if not already installed)
# See https://swift.org/download for the latest version
wget https://download.swift.org/swift-5.9-release/ubuntu2204/swift-5.9-RELEASE/swift-5.9-RELEASE-ubuntu22.04.tar.gz
tar xzf swift-5.9-RELEASE-ubuntu22.04.tar.gz
sudo mv swift-5.9-RELEASE-ubuntu22.04 /opt/swift
echo 'export PATH=/opt/swift/usr/bin:$PATH' >> ~/.bashrc
source ~/.bashrc
# Install dependencies
sudo apt-get update
sudo apt-get install -y poppler-utils imagemagick
# Fix ImageMagick PDF policy (required)
sudo sed -i 's/rights="none" pattern="PDF"/rights="read|write" pattern="PDF"/' /etc/ImageMagick-6/policy.xml
# Build and install
git clone https://github.com/Francium-Tech/scanify.git
cd scanify
swift build -c release
sudo cp .build/release/scanify /usr/local/bin/
Fedora/RHEL:
# Install dependencies
sudo dnf install poppler-utils ImageMagick
# Fix ImageMagick PDF policy
sudo sed -i 's/rights="none" pattern="PDF"/rights="read|write" pattern="PDF"/' /etc/ImageMagick-6/policy.xml
# Then follow the build steps above
Arch Linux:
# Install dependencies
sudo pacman -S poppler imagemagick
# Then follow the build steps above
# Build the image
docker build -t scanify .
# Run
docker run --rm -v $(pwd):/data scanify /data/input.pdf /data/output.pdf
# Basic usage - creates input_scanned.pdf
scanify document.pdf
# Specify output path
scanify document.pdf scanned_output.pdf
# Aggressive mode - more noise, rotation, artifacts
scanify --aggressive document.pdf
# Bent paper effect - shadow band like curved paper
scanify --bent document.pdf
# Dusty scanner - random dust specks and particles
scanify --dusty document.pdf
# Combine options
scanify --aggressive --bent --dusty document.pdf
| Option | Description |
|---|---|
--aggressive | Apply stronger scan effects (more noise, rotation, artifacts) |
--bent | Add paper bend shadow effect (like curved paper under a scanner) |
--dusty | Add random dust specks and hair particles (like a dirty scanner glass) |
--version | Show version |
--help | Show help |
| Effect | Description |
|---|---|
| Paper darkening | Whites become slightly gray (scanned paper is never pure white) |
| Edge shadows | Vignette effect from scanner lid |
| Top shadow | Gradient shadow at top edge |
| Uneven lighting | Slightly off-center lighting variation |
| Noise/grain | Paper texture simulation |
| Slight blur | Optical imperfection |
| Random rotation | Paper feed misalignment |
| Saturation reduction | Scanner color limitations |
--aggressiveAmplifies all base effects for a more dramatic scan appearance:
--bentAdds a horizontal shadow band across the page to simulate paper that isn't perfectly flat on the scanner glass.
--dustyAdds random artifacts to simulate a dirty scanner:
pdftoppm and pdfinfo)convert and identify)MIT License - see LICENSE
Swift
98.8%
Dockerfile
1.2%