PDF Commons

Add PDF margin

Adds the same margin, in points, around every page. 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.

Where the added margin sits

Add PDF margin takes one PDF and one field. The field name is points. The label is Points. The default is 36. The worker keeps a whole number from 1 through 144. pdf-lib loads the file and builds a new PDF. Each new page adds twice the points to the visual width and to the visual height. embedPage copies the old page. The drawing is inset by those points on every side. Nothing is scaled. The new page rotation is 0. The crop box is set to the new media box. A page of 200 by 100 points with 36 points of margin becomes 272 by 172 points. pdf-lib 1.17 reads the media box and does not apply Rotate, so a turn of 90 or 270 swaps width and height before the margin is added. The place function from four-up positions that turn. A page of 400 by 200 points rotated 90 degrees has a visual size of 200 by 400. With 36 points the sheet is 272 by 472 and the rotation flag is 0. Words stay selectable because the content stream is embedded, not rasterized. Annotations are not copied. The smallest margin is 1 point and the largest is 144. This is not Crop PDF, which hides edges in cropped.pdf. This is not Resize PDF, which scales onto Letter or A4 in resized.pdf. This is not Scale PDF, which multiplies by a percent in scaled.pdf. This is not Four-up PDF, which places four pages on one sheet in four-up.pdf. The download is one file named margined.pdf.

The margin runs in this tab with the open-source workers. The file is not uploaded. There is no GridFS copy. Closing the tab drops the copy. The browser downloads margined.pdf. Crop PDF writes cropped.pdf. Resize PDF writes resized.pdf. Scale PDF writes scaled.pdf. The Word page at /pdf-to-word uploads.

There is no page cap on this margin. 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. Neither charge is required to add a margin here. The 20-page server cap is not this tool. That cap belongs to PDF to Word, OCR, and heavy compress.

An empty file stops with "This PDF could not be read." Bytes that are not a PDF stop with "This PDF could not be read." A file with no pages stops with "This PDF has no pages." A margin that is not a whole number from 1 to 144 stops with "Enter a whole number from 1 to 144." A locked file, opened without its password, stops with "Expected instance of PDFDict, but got instance of undefined". Unlock PDF is the separate page. This page does not ask for a password and does not guess one.

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

How large is the new page?

A page of 200 by 100 points with the default of 36 becomes 272 by 172. The drawing is not scaled. The new rotation is 0. The crop box matches the new media box.

Is the PDF uploaded?

No. The margin runs in this tab. The file is not uploaded. Closing the tab drops the copy. You get one file named margined.pdf. The Word page at /pdf-to-word uploads.

What happens to a rotated page?

A rotation of 90 or 270 swaps the visual width and height before the margin is added. embedPage draws the old page inside the margin. The new page rotation is 0.

Does this page need the $6 day pass?

No. A $6 day pass lasts 24 hours, is charged once, and does not renew. A $60 year lasts 365 days. Neither charge is required to add a margin here. The 20-page server cap is not this tool.

Also