PDF Commons

Crop one edge

Insets one edge of the crop box. The media box stays. It runs in this tab. The file is not uploaded.

A $6 day pass is 24 hours, charged once, and it does not renew. Pricing

No ad script loads from this choice. It stays in this browser.

What this one edge changes

Crop one edge takes one PDF, a select named Edge, and a number field named Points. The select offers top, right, bottom, and left. Top is selected when the page opens. Points is type=number and starts at 36. The worker reads the crop box of every page with pdf-lib. When a page has no crop box of its own, that read is the media box, and that rectangle is the one this tool insets. Only the chosen edge moves inward. Top reduces the height and leaves x, y, and the width alone. Bottom raises y and reduces the height. Left raises x and reduces the width. Right reduces the width and leaves x alone. The new rectangle is written with setCropBox. The media box is not written. A page that measures 200 by 100 points, cropped from the top by 20 points, keeps a media box of 200 by 100 and a crop height of 80. The crop width stays 200. The page is not redrawn, and marks outside the new box are not deleted. Hidden marks stay in the file, so this is not redaction. The download is one PDF named cropped.pdf. Crop PDF insets every edge by one trim. This page moves one edge and keeps the page count. The original file on the computer is not rewritten.

The inset runs in this browser tab. The file is not uploaded. There is no GridFS copy. Open the network panel, drop the file, choose the edge, and the PDF should not appear as an upload. The browser offers cropped.pdf when the box is set. Closing the tab drops the copy. The Word page at /pdf-to-word uploads.

There is no account on this local tool. The tab has to hold the file. This page does not need a pass. A day pass is $6, charged once, for 24 hours, and it does not renew. A year is $60 for 365 days. The $6 day pass and the $60 year are for server jobs. The 20-page server cap is not this tool. That cap belongs to PDF to Word, OCR, and heavy compress.

The edge must be top, right, bottom, or left. Any other value fails with "Choose top, right, bottom, or left." The points must be a whole number greater than 0. Zero, a fraction, or a negative number fails with "Enter a whole number of points." If any page would have a crop width or a crop height under 1 point, the tool fails with "Leave at least one point of the page." No page is changed in that case. A file with no pages fails with "This PDF has no pages." Empty bytes, or a file that is not a PDF, fails with "This PDF could not be read." A locked PDF stops with "Expected instance of PDFDict, but got instance of undefined". This page does not ask for a password and does not guess one. Unlock PDF is the separate page.

Steps

  1. Drop the file. It stays in this tab.
  2. Set the one option on the page, if it has one.
  3. Download the result. Closing the tab drops the copy.

Questions

Which edge moves inward?

Only the edge named in the select. Top is the default. Points starts at 36. The media box stays. The download is cropped.pdf.

Does this crop upload the PDF?

No. It runs in this tab. The file is not uploaded. There is no GridFS copy. Closing the tab drops the copy. You get one PDF named cropped.pdf.

What stays the same on a 200 by 100 page?

Cropping the top by 20 points leaves a crop height of 80 and the same media box of 200 by 100. Drawn text stays in the file. pdf-lib writes the crop box with setCropBox and does not delete content.

Do I need a pass before I crop one edge?

No. This page does not need a pass. A day pass is $6, charged once, for 24 hours, and it does not renew. A year is $60 for 365 days. The 20-page server cap is not this tool.

Also