File & PDF Tools

Crop PDF Pages

Set visible PDF page crop margins in points.

Crop PDF pages
Set visible crop margins in points without rasterizing page content.
Local browser processing

Crop PDF Pages

Set crop margins in PDF points (1/72 inch). This changes the visible box without deleting content outside it.

Important

  • Margins cannot exceed the page dimensions
  • Useful for scan borders and consistent visible margins
  • Do not use cropping alone to hide sensitive information

Rewrites the CropBox of selected PDF pages so viewers, printers, and PDF libraries show only the trimmed rectangle. You enter four margins in points (1/72 inch) and the page content stays byte-for-byte untouched. Suited to stripping scanner borders, unifying visible margins across pages, or fitting a fixed aspect ratio before export.

Which page box gets rewritten

ISO 32000-1 section 14.11.2 gives every page four boundaries, and cropping touches only CropBox — the rectangle viewers and print pipelines treat as the visible area. It is a four-number array, [llx lly urx ury], in default user space: the origin sits at the lower-left corner and the y axis points up. A page with no CropBox entry inherits the MediaBox, which is the normal state for a text PDF that was never cropped. Units are points, 1 pt = 1/72 inch, so 1 mm is about 2.835 pt and the 18 pt default on each side equals 6.35 mm. US Letter is 612 x 792 pt and becomes 576 x 756 pt after trimming 18 pt per side; A4 starts at 595.276 x 841.89 pt, never at round inch values.

How the four margins become an array

The tool reads the current CropBox of each selected page, then writes a new one: x becomes box.x + left, y becomes box.y + bottom, width becomes box.width - left - right, height becomes box.height - top - bottom. The library stores a box as a lower-left corner plus a size, so the file entry is serialized as the two opposite corners [x y x+width y+height]. Two consequences follow directly. The base is the existing CropBox rather than the MediaBox, so applying the same numbers twice trims twice as much. And a page whose MediaBox does not start at 0 0 keeps that offset, which is why the saved array often reads [18 18 594 774] instead of starting from zero. If any page would drop below 1 pt of width or height, the whole run aborts and names the offending page.

Why the file stays the same size and the text survives

Cropping is a metadata edit, so content streams, fonts, and embedded images are copied through unchanged; the tool only re-serializes the object graph and compacts it with object streams. A 12 MB scan cropped down to its text area is still about 12 MB. The part that surprises people is extraction: converters and clipboard selection walk the content stream and ignore the CropBox, so a letterhead cropped off a statement is still copyable, searchable, and recoverable with any PDF-to-text tool. Page geometry also survives intact — MediaBox, BleedBox, and TrimBox still describe the full sheet. Treat cropping as a display adjustment for scans and layouts, never as redaction. Rotated pages need a second look as well: margins are measured in unrotated user space, so a page carrying /Rotate 90 loses a different visual edge than the labels suggest.

Worked example

Trimming a US Letter page by 18 pt on every side

Input
A page with MediaBox [0 0 612 792] and no CropBox entry, margins top/right/bottom/left = 18
Output
/CropBox [18 18 594 774], a 576 x 756 pt visible area (8 x 10.5 in)

One inch is 72 pt, so 18 pt per side removes 36 pt from each dimension: 612 - 36 = 576 and 792 - 36 = 756. Because the box is written as lower-left plus size, the opposite corner lands at 18 + 576 = 594 and 18 + 756 = 774. The MediaBox and every content stream remain as they were, so nothing was rasterized or re-encoded.

Limits and pitfalls

  • Each margin must be between 0 and 2000 pt, and every page has to retain at least 1 pt of width and height; the run is rejected before the first page is written.
  • One set of four numbers applies to every selected page, so documents with mixed page sizes or shifted origins produce visibly uneven results.
  • Cropping is cumulative because the base is the existing CropBox: running 18 pt twice removes 36 pt from each side.
  • On pages carrying /Rotate 90, 180, or 270 the margins still act on unrotated coordinates, so the visual top edge is not necessarily the one that loses space.
  • Input is capped at 100 MB per file; cropping does not reduce file size, and anything outside the new box remains extractable.

Related tools

When it goes wrong

The page looks cropped, but the text is still selectable outside the visible area and a copy-paste from a PDF reader still grabs it.

CauseA crop box only narrows the visible region; it never deletes content. This tool calls setCropBox on each page and leaves the media box, text layer, and images untouched, so a viewer can still be told to ignore the crop.

FixIf the hidden content must be gone rather than hidden, flatten the pages to images (rasterize) before sharing, or redact the original source document. Treat cropping as a layout operation, not as redaction.

Every page reports that the crop margins exceed the page size, even though the values look small.

CauseMargins are in points, not millimetres: 18 points is about 6.3 mm, and the check compares left + right (and top + bottom) against the actual page box of that page. A document mixing A4 and a narrow label size will fail on the narrow pages only.

FixSet margins per side so that left + right stays below the page width and top + bottom below the height, and check the smallest page size in the file. 1 mm is roughly 2.83 points.

The downloaded file is the same size as the original, and nothing appears to have changed in one PDF reader.

CauseSome readers cache the rendered page and ignore a changed crop box until the document is reloaded, and the file itself only gained a few bytes because no page content was re-encoded.

FixReopen the downloaded file rather than the original tab, and verify with a second viewer. If your requirement is a smaller file, cropping will not do it — compress or downscale instead.

One concrete scenario

Removing a 20 mm scanner border from a 200-page A4 scan

A scan produced on an A4 sheet is 595 × 842 points (210 × 297 mm). The scanner leaves a 20 mm white border on every edge. Converted to points, 20 mm is about 57 points, so entering 57 for all four sides leaves 595 − 114 = 481 points wide and 842 − 114 = 728 points tall — still inside the page, so the crop succeeds on all 200 pages in a single pass. Because the operation only rewrites page boxes, the run costs almost nothing in memory and the output keeps the original text layer and image resolution. If instead you see a per-page error naming one page, that page is a different size: apply the crop to a page range, or split first and crop the odd pages separately.

Frequently Asked Questions

Does cropping really delete page content?
No. PDF cropping (CropBox) only declares the visible area — content outside remains in the file and can be restored. Important: never use cropping to hide sensitive information (headers, annotations); removing content requires actual redaction.
How do I quickly remove scanner black borders?
Check one page to determine margins (1 inch = 72 points); 10–20 points per side usually cleans up, then apply to all pages. If pages drift differently, process in batches rather than tuning each page.
Why did the print size change after cropping?
Printing fits "scale to paper", and cropping changed the aspect ratio, so the fit differs. To preserve print size, crop with the target paper’s aspect ratio, or print at "actual size".

Content reviewed: