PDFをトリミング
ページの表示範囲を切り詰めます。手動でも、比率指定でも、自動でも。
このツールはブラウザーの中だけで動きます。ファイルがアップロードされることはなく、そのことはブラウザーのネットワークタブでご自身で確認できます。 ご自分で確かめてください。ブラウザーのネットワークタブを開いて見てください。残りの作業回数を尋ねる小さなリクエストが1つだけ表示されます。ツール名とハッシュだけで、ファイルは決して含まれません。
このツールでできること
Cropping a PDF sets its crop box, which tells a reader which part of each sheet to display. It does not delete anything: the content outside the box is still in the file, and widening the box again brings it back. That is worth knowing before you crop a signature or an account number off something and send it on.
The usual reasons are a scanner that left 15 mm of grey around every page, a document with margins so wide it wastes half a tablet screen, a page that has to fit a slide or an e-reader, or receipts photographed with a desk in the frame.
仕組み
- Drop the PDF onto this page and wait for the first page to render.
- Choose the mode: drag the rectangle yourself, let the tool find the content, or crop to a fixed shape.
- For a manual crop, drag the handles, or type what to take off each edge in millimetres, points or inches.
- For an automatic crop, set the breathing room to leave around the content - six points is a sensible start.
- Decide whether to crop every page or only a range, then press Crop.
- Check a page in the downloaded file before you discard the original.
The automatic mode is why most people come here. Each page is rendered small - 400 pixels on its long edge, which is ample, since ink boundaries do not move when you look at them from further away - and every pixel more than about 9 percent away from white counts as content. The bounding box of that content, plus your margin, becomes the crop box. Rendering 300 pages at full resolution to find their margins would cost more than the crop.
Automatic cropping measures each page separately, so pages end up different sizes when their content does. That suits reading on a screen and is awkward for printing, where one tray wants one size; crop by hand or by shape if every page must match. A page with no ink has no box to compute, so it keeps its full size rather than being cropped to nothing, and a document where every page is blank is refused rather than destroyed.
Crop to a shape takes the largest rectangle of the proportions you pick that fits inside the page, centred. A4 is the 1:1.414 shape of the paper itself, so it trims a letter-sized page to those proportions; 16:9 on a portrait page removes a great deal of height, which is the point when the result is going into a slide. Nothing is scaled - only the visible window changes.
Also shrink the page size reduces the media box along with the crop box, so readers and printer drivers that ignore the crop box obey too. It is harder to undo, and it is still not deletion: the content outside is exactly where it was.
Everything happens in your browser: PDF.js renders the pages to measure them and pdf-lib writes the boxes. The pages are never re-encoded, so a scan keeps its original image data at full resolution.
このツールにできないこと
- Cropping hides content, it does not remove it. Everything outside the crop box remains in the file and reappears the moment somebody widens the box. Use Redact PDF when the content must actually be gone.
よくある質問
- 切り落とした部分は本当に消えていますか?
- 消えていません。トリミングは、どこを表示するかをリーダーに伝えるクロップボックスを書き込むだけです。その外側にあるテキストや画像はファイルの中にそのまま残っており、ボックスを広げるツールを使えば元に戻ります。署名・住所・口座情報などを隠す目的でトリミングしているのであれば、代わりに「PDFを墨消し」をお使いください。こちらはページをピクセルから作り直すため、下には何も残りません。
- 余白の自動カットは、どうやって内容の位置を判断していますか?
- 各ページを長辺400ピクセルで描画し、白から約9パーセント以上離れたピクセルをインクとみなします。このしきい値は、グレーがかったスキャン用紙を内容と取り違えず、それでいて薄い黄色のマーカーは内容として拾えるように選んであります。そうしたピクセルを囲む矩形に、指定した余白を足し、ページの範囲に収めたものがクロップボックスになります。
- 一部のページだけ、あるいはページごとに違うトリミングはできますか?
- できます。「適用範囲」を「すべてのページ」から「ページ範囲」に切り替えて、対象ページを指定してください。それ以外はそのまま残ります。自動モードでは範囲内の各ページをそれぞれの内容から計測するので、内容がばらばらのドキュメントでも、あるページの余白が他に引き継がれることはありません。
- あとからトリミングを取り消せますか?
- 取り消せます。もう一度、大きめのボックスでトリミングしてください。何も削除されていないので内容は戻ります。「用紙サイズも縮める」をオンにした場合は、用紙そのものが定義し直されているため、少し手間がかかります。いずれの場合も、結果を確認するまで元のファイルは残しておいてください。
- 計測のためにドキュメントが端末の外に出ることはありますか?
- ありません。余白を見つけるための描画は、お使いの端末のWeb Worker内のOffscreenCanvasで行われ、そのピクセルが外に出ることはありません。自動トリミングはたしかにページの中身を見ますが、見るのは端末の中だけで、送信は一切ありません。