PyCropPDF
PyCropPDF is a desktop PDF editor for cropping, rotating, and visually covering PDF pages.
Install
Standalone builds
The latest release provides
x86_64 builds for Windows (.exe) and Linux (.AppImage). Both include Auto deskew.
On Linux:
chmod +x PyCropPDF-*-x86_64.AppImage
./PyCropPDF-*-x86_64.AppImage
AppImage normally uses FUSE 2. If FUSE is unavailable, run it without mounting:
APPIMAGE_EXTRACT_AND_RUN=1 ./PyCropPDF-*-x86_64.AppImage
PyPI
PyCropPDF requires Python 3.11 or later.
python -m pip install pycroppdf
Auto deskew is optional because it adds NumPy and scikit-image:
python -m pip install "pycroppdf[deskew]"
Run
pycroppdf
pycroppdf --input /path/to/document.pdf
Optional arguments:
--save-to DIRECTORYsaves to that directory instead of opening a Save dialog.--save-as NAME.pdfsets the output name when used with--save-to. Without it,--save-towrites<input>_modified.pdf.--manifest-out PATHsets the JSON provenance-manifest path. By default it is saved next to the PDF as<output>.pycroppdf.json.
Edit a PDF
- Open a PDF with File > Open PDF... or drag it into the window.
- Use View to choose one overlay for all pages or separate odd/even overlays.
- Click a thumbnail image to preview that page. Click it again or use Stack to return. Thumbnail checkboxes select pages for deletion;
Ctrl/Cmdtoggles andShiftselects a range. - Open Rotate, choose all, odd, even, or the previewed page, and enter an angle. Click Preview to inspect a fine rotation, Discard to clear it, or Apply to change the PDF. The 90-degree buttons apply immediately; Auto deskew detects and corrects small angles per page.
- Click Cover, choose All, Odd, or Even, then draw the cover. In a page preview, This page only overrides that scope. Cover works inside an active crop and before or after applied rotation. New covers are added without replacing existing ones and do not remove the underlying PDF content.
- Click Crop, draw a crop box, then click Apply Crop. Odd/even positions are independent and their sizes stay uniform. To override one page, preview it, enable This page only, draw its crop box, and apply the crop again.
- Use Undo or
Ctrl+Zto revert one edit. Use Reload to discard all edits and reopen the original PDF from disk. Click Save to export the result.
Crop applies to all pages. Cover uses its selected scope and remains additive. A per-page crop override replaces the stack crop only for that page.
Rotation, Auto deskew, and Cover remain available after cropping. Affected crop boxes follow the rotated pages; fine rotation expands their bounding boxes so cropped content is not cut at the corners. Apply or discard a rotation preview before drawing a cover. For pages with links, annotations, or form fields, the app warns before a fine-angle rotation because some appearances or destinations cannot be transformed exactly.
Tools
| Tool | Effect |
|---|---|
| Crop Box | Changes the PDF CropBox. The content outside the visible area remains in the file. |
| Cover | Adds a rectangle to all, odd, even, or only the previewed page. Existing covers and covered content remain in the file. |
| Rotation | Rotates page content without rasterizing it. Exact 90-degree turns use PDF rotation metadata. |
| Auto deskew | Detects a small text-line angle independently for each target page. Requires pycroppdf[deskew]. |
Crop boxes and covers change presentation; they do not securely remove content. Larger Auto deskew jobs use one fewer worker than the detected CPU count. Two-core systems use both cores. Small jobs stay in one process to avoid startup overhead.
Provenance manifest
Each save writes a JSON sidecar manifest unless a different path is supplied with --manifest-out. It records source and output SHA-256 hashes, page mapping and deletions, rotations, and crop and cover rectangles.
Development
git clone https://github.com/lukaszliniewicz/PyCropPDF.git
cd PyCropPDF
python -m pip install -e ".[dev,deskew]"
pytest
ruff check .
ruff format --check .
Build a standalone Windows executable with PyInstaller:
python -m pip install -e ".[build,deskew]"
powershell -NoProfile -ExecutionPolicy Bypass -File .\scripts\build_windows.ps1
Install pycroppdf[deskew] in the build environment to include Auto deskew. The build script supplies the PyInstaller hook needed by scikit-image's runtime package checks. Deskew roughly doubles the executable size.
License
Metadata
Release files for pycroppdf 0.4.4
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| pycroppdf-0.4.4.tar.gz | 56.8 kB | Without provenance | Details for pycroppdf-0.4.4.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| pycroppdf-0.4.4-py3-none-any.whl | Python 3 | none | any | Details for pycroppdf-0.4.4-py3-none-any.whl |
Total release size: 100.6 kB
Release files / pycroppdf-0.4.4.tar.gz
| Download URL | pycroppdf-0.4.4.tar.gz |
|---|---|
| Size | 56.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
4edfb41b8b704ed45557396504e50708078497cbff1985eed26fd8796d712822
|
|
BLAKE2b-256 checksum How to use checksums |
85a9fd7ebfb8482ed4180de16505139977ee582b68fe6eab1b64461385015f1b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.11.15
|
Release files / pycroppdf-0.4.4-py3-none-any.whl
| Download URL | pycroppdf-0.4.4-py3-none-any.whl |
|---|---|
| Size | 43.8 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
7286850e06fe4273e8b78f72aa0c799173c2ebc0dcd813684367b17e8a49e52a
|
|
BLAKE2b-256 checksum How to use checksums |
7ae59450a0ee520bd26203828375ccad43d1caaa160a601f16a21f15a253751f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.11.15
|
Security for pycroppdf 0.4.4
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.