PDF Margin Cropper & Trimmer
PDF Margin Cropper & Trimmer: Reads existing CropBox/MediaBox origin coordinates and applies symmetrical inset offsets to `/CropBox`.
About this pdf margin cropper & trimmer
PDF Margin Cropper & Trimmer — browser-based utility.
How this tool works
Implements client-side PDF Margin Cropper & Trimmer operations. Reads existing CropBox/MediaBox origin coordinates and applies symmetrical inset offsets to `/CropBox` specifically designed for an e-reader owner crops wide empty white margins from a scanned academic paper for comfortable kindle reading.
- PDF Catalog & XRef Ingestion: Parses binary PDF headers, trailer dictionaries, and cross-reference streams to index document object IDs.
- Page Tree & Box Dimension Inspection: Reads /MediaBox, /CropBox, and /Rotate attributes for each page dictionary in the document hierarchy.
- Symmetrical Coordinate Transformation: Calculates offsets relative to existing [x, y] origins for margin trimming or updates /Rotate angles.
- Document Re-serialization: Re-serializes the PDF object stream, updating byte offsets in the XRef table and preserving AcroForm dictionaries.
Worked example
Scenario: Crop the displayed page boundary of a local 300 × 200-point PDF.
Sample input:
Processing: Read the page box, set CropBox to [24, 24, 252, 152], and save with pdf-lib.
Illustrative output:
Limits and verification
Password-encrypted PDF files must be decrypted before processing. Margin cropping offsets cannot exceed half of the page width or height. Files with damaged XRef tables are repaired automatically where possible.
Examples demonstrate an expected workflow; they do not prove every input or every branch of an external specification. Check important results with an independent source before using them for money, security, compliance, safety, or irreversible file changes.
Browser processing boundary
Tool input is processed by code running in the browser and is not intentionally sent to a CZOA processing API. The page can still request ordinary site assets, analytics, or advertising when those services are enabled. Browser extensions and managed-device software remain outside this tool's control.
Relevant references
These references govern or help explain the format, protocol, or calculation used here. Listing a reference does not claim certification or complete implementation of every optional feature.
Content owner: CZOA Tools · Last reviewed: 2026-09-15 · Review methodology
How to use it
- Enter, paste, or select your input data into the PDF Margin Cropper & Trimmer workspace controls.
- Review available parameter fields, units, formats, or options configured for your task.
- Click the action button or observe immediate live calculations rendered in your browser runtime.
- Inspect the resulting output and any diagnostic messages, then copy or download the result if needed.
Frequently asked questions
How does PDF Margin Cropper change a PDF?+
It loads the first selected PDF with pdf-lib. For every page it reads CropBox, or MediaBox if no CropBox exists, then sets a new CropBox inset by the same number of PDF points on each edge. It saves a new PDF without rasterizing or reflowing page content.
Which controls and values are available?+
The page has one local PDF chooser, a numeric Crop from each edge (PDF points) field whose initial value is 24, and Process locally. There is no per-side setting, page range, automatic content detection, preview, rotation, scaling, MediaBox editor, or output-name control.
What error and layout limits apply?+
The margin must be a finite non-negative number. Processing stops when twice that value is at least the chosen box width or height. It changes the displayed CropBox only; it does not remove outside objects, enlarge text, alter the MediaBox, or determine whether margins are empty. Encrypted or malformed PDFs may fail to load.
What did isolated browser verification establish?+
In an isolated Chromium file run, an independent 300×200-point one-page PDF used the visible 24-point setting. Poppler reported CropBox 24.00 24.00 276.00 176.00 in the download. This covers that equal-inset path, not automatic margin analysis or every PDF box arrangement.
