PDF Margin Cropper & Trimmer
Manually adjust four margins or automatically estimate white margins separately on every page of a local PDF below 100 MB. Inspect each proposed unrotated box. Save a new CropBox, optionally trim MediaBox, and preserve vector content and page rotation.
About this pdf margin cropper & trimmer
Manually adjust four margins or automatically estimate white margins separately on every page of a local PDF below 100 MB. Inspect each proposed unrotated box. Save a new CropBox, optionally trim MediaBox, and preserve vector content and page rotation Parses and structures office document payloads locally in memory without transmitting private company files to external servers.
Document parsing & data extraction pipeline
Performs non-destructive manipulation of Portable Document Format (PDF) binary object streams in accordance with ISO 32000-1 and ISO 32000-2 (PDF 2.0). Operates on underlying PDF cross-reference tables (XRef), catalog dictionaries, page trees (/Pages), and content streams via pdf-lib and PDF.js. Implements symmetrical margin cropping based on existing CropBox / MediaBox origin coordinates [x, y], executes 90-degree page rotations, merges/splits page trees, and preserves AcroForm interactive form fields, annotations, and bookmarks.
Worked document extraction example
Scenario: Detect margins around a black rectangle
Sample input:
Processing: The client-side engine parses the provided input, executes the transformation routine, and outputs the result in real time.
Illustrative output:
File size & structure constraints
Operational constraints and validation boundaries: Automatic detection renders locally on white at up to 2 pixels per PDF display point, longest side 1,600 pixels, at most 100 pages and 64,000,000 pixels total; 15 seconds per page render. Any color channel below 250/255 counts as content, with 2 unrotated PDF coordinate units of padding. This is an approximate near-white detector: faint marks, small text, transparency and downsampling may be missed; inspect the proposal and keep the original. Blank pages keep their box. The diagram shows geometry, not rendered content. Manual margins apply equally to all pages; automatic boxes vary by page. Both use the original CropBox–MediaBox intersection in unrotated PDF coordinates. CropBox changes; MediaBox only if selected. Nothing outside a box is deleted or redacted. Invalid/password-protected PDFs are rejected; file must be nonempty and below 100,000,000 bytes. Desktop rendering/printing and near-limit memory remain unverified.
PDF Margin Cropper & Trimmer parses structured OpenXML and PDF data locally. Review exported tables or sheets against original files.
Zero-upload document security boundary
File buffers and document assets in PDF Margin Cropper & Trimmer are processed in-memory via local browser APIs with zero file uploads to CZOA servers.
Document schemas & interchange standards
ECMA-376 Office Open XML specifications and ISO 32000 PDF reference standards:
PDF Margin Cropper & Trimmer verification · Audit standards
How to use it
- Choose a PDF smaller than 100 MB
- Inspect page boxes
- Detect white margins on all pages
- Crop all pages locally
- Download cropped PDF
Frequently asked questions
How does automatic white-margin detection work?+
Optional: inspect first, then detect separate margins for each page. Review the geometry before cropping. Changing any manual margin switches back to the same four manual margins for all pages.
Does cropping remove hidden content?+
The tool supports two primary workflows: automatic white-margin detection that analyzes canvas pixels to remove excess border margins, and manual numeric adjustment allowing precise point or percentage offsets for top, bottom, left, and right borders.
What are the limits?+
Automatic detection renders locally on white at up to 2 pixels per PDF display point, longest side 1,600 pixels, at most 100 pages and 64,000,000 pixels total; 15 seconds per page render.
Detect margins around a black rectangle+
Upload a 200 × 200 point PDF containing a black rectangle at x=40, y=50, width=100, height=80.
