企评社

Interface labels are shown in English. Company reviews, forum posts and tool descriptions are currently available in Chinese only.

PDF crop / trim margins

Trim the big white margins of a scan automatically, or crop by margin or ratio; only the visible area changes, the content is not re-encoded

文件不上传服务器:解析、检测与裁剪全在你的浏览器里完成

把 PDF 拖到这里,或点击选择

一次处理一个文件;原文件只被读取,导出的是一份新 PDF,原文件不会被修改

PDF 去白边、裁边距的常见场景

扫描件四周全是大片白边。用复印机、扫描仪或手机扫描出来的 PDF,往往纸张比内容大一圈:A4 页面上只有中间一块发票、证件或书页,四周留白既占地方又让文字显得很小。这类文件用「自动去白边」最省事——工具逐页把页面渲染成画布、扫描出非白内容的外接矩形,再按这个矩形设定每页的可见区域,一圈白边一次去掉。也可以在检测结果上再加 2mm 左右的内边距,避免把内容边缘裁得太紧。

投屏、打印前裁掉页眉页脚。从网页或系统导出的 PDF,页脚常有「第 x 页 / 共 y 页」、网址、打印时间,页眉有系统名称或公司落款。如果只是拿去投屏演示或再次打印,这些边角信息会抢版面。用「统一边距裁剪」,在上/下/左/右各填几毫米(1mm ≈ 2.8346pt),对选中的页面一次性裁掉同样的边距,比逐页调整快得多。

只保留某一块内容区。有些资料是一页里排了好几栏,或一页里同时有正文与广告条;也可能只需要页面中间 80% 的表格。这种「按比例裁剪」按居中方式取 A4、16:9、1:1 等目标比例,或直接保留中间 80%,多余部分从两侧对称裁掉,内容本身不缩放、不变形。

关键区别:本页是无损裁剪。本工具用的是 PDF 的 CropBox(页面可见区域)机制:只修改页面上一个描述「可见矩形」的数值,页面的文字、矢量图形、嵌入图片一个字节都不重新编码,因此画质完全无损、文件体积几乎不变(通常只多出几十到几百字节),页内的文字依然可以选中与搜索。与之相对,另一种常见做法是「把每页渲染成图片再拼成一份新 PDF」——那会重编码成位图:体积可能反而暴涨或画质明显下降,文字也从此无法复制、无法检索,扫描小字放大后会发虚。你只是想去掉空白,没有任何理由付出这些代价,所以本页选择了前者。

关于隐私。整份 PDF 全程留在你的浏览器里:用 pdf.js 渲染到画布做白边检测,用 pdf-lib 改页面的可见区域,全部在本地内存完成,文件不会被上传到任何服务器(可打开浏览器开发者工具的 Network 面板核验,没有任何文件上传请求)。合同、发票、证件扫描件这类敏感材料可以放心处理。

FAQ

Does cropping degrade quality or shrink the file?

Neither. Cropping only changes the visible area of each page (the CropBox); page content is not re-encoded, so quality matches the source exactly and text stays selectable and searchable. File size usually barely changes either - white margins cost no space inside a PDF, so removing them saves display area, not storage. If you want a smaller file, use our image compression tool or re-export scans at a lower resolution instead.

Could automatic margin removal cut into the content?

By default an extra 2mm inner padding is kept, and the crop box is force-clamped inside the original page and never below 20pt; if the computed box for a page is invalid (the page is blank, no content detected), that page is skipped and left untouched. Before export the preview draws an orange frame showing the area to be kept - check the first page's detection in the preview before deciding to export. As a safety habit, try on a copy first.

Why were some pages not cropped?

Two possibilities: the page was judged blank as a whole (no non-white pixels found) and skipped by design, left untouched; or its detected content area would crop to under 20pt or fall outside the page - an invalid crop box, also skipped. The status area after export reports 'cropped N pages (skipped M)' separately, with the skip reasons spelled out.

Does cropping affect page numbers, bookmarks or forms?

No. Page count, page order, bookmarks, links and form fields are all untouched - only each page's visible area becomes smaller (like looking at part of it through a magnifier). If a page carries rotation, the tool recomputes coordinates in the rotated visible orientation so the side you see is the side that gets cut.

It says the PDF is encrypted - what now?

PDFs with an open password cannot be parsed by the browser, so this tool cannot process them either. Open the file in a reader, save a copy without the password, then drop that copy in for cropping. Your original file is never modified; loading another file clears the in-memory copy.

Related tools