Auto-trim white borders or crop fixed margins — a real CropBox, written in your browser
Padding is added around the detected or fixed box before writing, so auto-trim keeps a small breathing border (set 0 for a tight hug). 72 pt = 1 inch.
| Size | Points (w × h) | Inches (w × h) | Use |
|---|---|---|---|
| US Letter | 612 × 792 | 8.5 × 11 | Default in North America |
| A4 | 595.28 × 841.89 | 8.27 × 11.69 | ISO default elsewhere |
| US Legal | 612 × 1008 | 8.5 × 14 | Contracts, court filings |
| Tabloid / A3-ish | 792 × 1224 | 11 × 17 | Spreads, drawings |
| A5 | 419.53 × 595.28 | 5.83 × 8.27 | Booklets, half-size |
PDF coordinates are measured in points, and 72 points make an inch — so a full-margin crop on Letter leaves 468 × 648 pt (6.5 × 9 in) of page.
| Box | What it defines | Who honors it |
|---|---|---|
| MediaBox | The physical page; the outer boundary everything else must fit inside | Every PDF consumer, always |
| CropBox | The region displayed, printed, and exported | Viewers, printers, most converters (what this tool writes) |
| BleedBox | Content plus bleed allowance for print finishing | Professional print pipelines |
| TrimBox | The finished page size after trimming | Professional print pipelines |
| ArtBox | The bounding box of the artwork itself | Design handoff workflows |
When no CropBox is set, viewers fall back to the MediaBox — which is why a scan's fat white borders show up until you crop.
Cropping a PDF is not painting white over the edges. A page carries several boundary boxes in its dictionary, and the CropBox is the one that says "this is what you show." Set it, and every viewer, printer, and thumbnail generator instantly treats your page as the smaller rectangle — the scan borders vanish, the content stops shrinking to fit oversized paper, and e-reader exports stop wrapping white rails around every page.
The tool renders each page to a canvas with pdf.js, scans the pixels for the first and last "ink" in each direction (a pixel counts as ink when it is darker than the white threshold), and maps those pixel bounds back to PDF points: x = view-origin + pixel ÷ scale, y = page-height − pixel ÷ scale, because canvas coordinates run top-down while PDF coordinates run bottom-up. A padding of your choosing is added, the box is clamped inside the MediaBox, and pdf-lib writes it as the page's CropBox.
Open the file, pick a mode, and watch the preview. Auto-trim with "scan every page separately" handles mixed documents — a full-bleed cover followed by bordered text pages each get their own box. Fixed margins is the one to choose for print prep, where every page must shrink by the same amount. The download appends -cropped to your filename; the original is never modified.
A Letter-size scan (612 × 792 pt) is rendered at 2× — a 1224 × 1584-pixel canvas. The detector finds ink from pixel x = 150 to 1049 and y = 310 to 1275, which maps to a crop box of [75, 154, 525, 637] in points: 450 × 483 pt, or 6.25 × 6.71 inches. That removes 55.2% of the page area — the white border was more than half the scan. With the default 12 pt padding the box grows to 474 × 507 pt (6.58 × 7.04 in) and the cut is 50.4%, leaving a slim breathing border that looks intentional rather than accidental.
For contrast, a clean office PDF with uniform 1-inch margins crops to 468 × 648 pt (6.5 × 9 in) — 37.4% of the page area gone, and the text jumps from "small island on white paper" to "page that fills the screen."
Open the file in the cropper, pick auto-trim (it finds the content on each page) or fixed margins, preview the rectangle on page one, and download. This tool runs entirely in your browser — no account, no watermark, and the file is never uploaded to a server.
No. Cropping sets a CropBox, which tells viewers to display and print only that region — the underlying content still exists in the file. That is why cropping is reversible, and also why you should never crop to hide sensitive text; for that, use a redaction tool that destroys the content.
Rarely. The page content streams, fonts, and images are all still in the file, so the byte size barely moves. If you need a smaller file, run it through a PDF compressor afterward — the two operations are independent.
MediaBox defines the physical page; CropBox defines the region shown, printed, and exported. Viewers honor the CropBox when one is present. This tool writes a CropBox and leaves the MediaBox untouched, so the change is easy to reverse or redo.
In general yes — most PDF print pipelines print the CropBox region when one is set, which is exactly why cropping is the right fix for scans with fat white borders that print oddly or shrink your content.
In auto-trim mode, effectively yes: the detector scans each page independently, so a 2-inch border on page 1 and a half-inch border on page 9 each get their own box. Fixed-margin mode applies one uniform cut to every page.