Crop a PDF by dragging a box on the page

Visually cropping a PDF means dragging a box over a rendered preview of the page to mark the area to keep, instead of typing margin measurements; this tool darkens the region that will be discarded, then writes the selection as the PDF crop box for that page or for all pages, entirely in your browser. The crop box changes what viewers display, while the content outside it remains stored in the file.

Visual crop — runs on your device

How it works

Every PDF page carries several rectangles in its page dictionary: the media box, which defines the full physical page, and the crop box, which defines the region a viewer should display. Cropping a PDF properly means writing a new crop box — a purely declarative change. Nothing inside the page is moved, scaled, or deleted; the viewer is simply told to show a smaller window onto the same canvas. That is why crop operations are instant, lossless, and reversible.

The visual part solves the coordinate problem. PDF coordinates are measured in points (1/72 inch) from the bottom-left corner of the page, which makes "trim 38 points off the left" an unintuitive instruction for a human. So this tool first renders the page with the pdf.js engine into a preview canvas at a known scale. You drag a rectangle over that preview marking the area to KEEP, adjusting its edges until it looks right; everything outside the rectangle is darkened so the discard region is unmistakable before you commit. When you apply, the tool converts the rectangle from preview pixels back into PDF points — inverting the render scale and flipping the y-axis, since screen coordinates grow downward while PDF coordinates grow upward — and pdf-lib writes the result as the crop box on the chosen page, or the same rectangle onto every page in the document.

The crop box's non-destructive nature cuts both ways, and it is worth being explicit about it. It means you can always undo a crop, and file size is essentially unchanged because all content is still there. It also means visual cropping is not a privacy tool: text "cropped out" of view is still stored in the file, still extractable by any text tool, and restorable by anyone who resets the crop box. If the goal is removing sensitive content rather than tidying the view, use redaction, which destroys the underlying data. And if your goal is simply removing uniform white margins, auto-crop can detect the content area for you without any dragging.

Illustrative example: isolating one figure region across 22 slides

Illustrative scenario, not a recorded benchmark. File sizes, timings and results depend on the input and device. Try the reproducible samples.

A researcher has a 22-page lecture-slide PDF (8.6 MB) where every slide has the same layout: a wide chart in the center, a university banner across the top, and a footer with logos. For a report appendix, only the chart region should show.

She opens the file in the tool, which renders slide 1 as the preview. She drags a box tightly around the chart area — the banner and footer fall into the darkened discard zone — nudges the bottom edge up to exclude a caption, and, because all 22 slides share the layout, applies the crop to all pages. The output PDF still weighs 8.6 MB (the banners and footers are hidden, not removed) but every page now displays as a clean 24×14 cm chart panel, and the charts remain vector-sharp at any zoom since nothing was rasterized. Total working time is about 30 seconds; the equivalent in a numeric crop tool would have required measuring the chart's offsets in points on all four sides first.

Visual cropping — frequently asked questions

How do I crop a PDF by dragging instead of entering measurements?

The tool renders the page as a live preview; you drag and adjust a rectangle over the part you want to keep, and everything outside the rectangle is darkened so the result is obvious before you commit. The selection is then applied as the page's crop box.

Is the cropped-away part of the PDF actually deleted?

No. Cropping sets the crop box, which tells viewers what region to display; the content outside it stays stored in the file and can be restored by resetting the crop box. To truly remove sensitive content, use a redaction tool instead.

Can I apply one dragged crop to every page of the PDF?

Yes. After dragging the box on the preview page you can apply it to just that page or to all pages at once. Applying to all pages suits uniformly laid out documents like slides or scans.

Does visual cropping reduce the quality of the PDF?

No. Only the crop box entry in each page dictionary changes; content streams, fonts, and images are untouched, so text stays selectable and nothing is re-rendered. The file size barely changes for the same reason.

Will the cropped PDF print at the smaller size?

Most viewers print the crop box region, so yes, the visible area is what prints. Some print workflows honor other page boxes, so check the print preview if exact output size matters.

Is my PDF uploaded while I crop it visually?

No. The preview is rendered by the pdf.js engine in your browser and the crop box is written locally by pdf-lib. The file never leaves your device at any step.

Related tools