How to compress a PDF to an exact file size (not just 'smaller')

Ten minutes before a filing deadline, the upload fails.

The portal says the file must be under 5 MB. Yours is 8.3. You run it through a compressor. It gives you 6.1 MB. You run it again. Now it is 5.9 MB and the text has gone soft. You run it a third time. 5.7 MB.

The compressor is doing its job. It is just not doing your job. It compresses. It does not aim.

"Smaller" and "under 5 MB" are different problems

Most PDF compressors offer you three buttons: low, medium, high. Each one is a fixed quality setting. What comes out the other side is whatever comes out. If the limit you have to meet is 5 MB, you are guessing, checking, and guessing again.

What you actually need is the opposite operation: you name the size, and the tool finds the settings.

That is a search problem, not a quality-slider problem. Render the pages at a given resolution, measure the result, and adjust the resolution until the file lands under the number you gave. A binary search over DPI gets there in six or seven attempts, and it lands on the highest quality that still fits — which is not the same as the first setting that happens to fit.

Where this actually bites

  • Court e-filing. Many systems reject anything over a hard per-document limit. There is no "close enough".
  • Government procurement portals. Bid submissions with fixed attachment ceilings, often with a clock running.
  • Email. 25 MB at Gmail, 20 MB at plenty of corporate servers, and the bounce arrives an hour later.
  • Grant and university applications. Per-file limits that were set in 2009 and never revisited.

In every one of these the number is not a preference. It is a wall.

We built the aiming version

You give it a target — 300 KB, 2 MB, 5 MB — and it lands under that number.

pdf300.com

Twenty-four PDF tools in one page. Fourteen of them run entirely in your browser, which means the file never leaves your machine. Merge, split, rotate, crop, sign, redact, convert. No account, no install.

The ten server-side tools — OCR, password removal, repair, Office conversion, and the target-size compression above — do send the file to us, because they cannot run in a browser. Those files are deleted immediately after processing. We say which is which on the page, because "no upload" would be a convenient thing to claim and only two-thirds true.

What it will not do

There is a floor. Below roughly 220 KB the page images have nowhere left to go, and asking for 10 KB will get you 220 KB and a note that the target was missed. If your source PDF is already smaller than your target, it comes back untouched rather than being re-rendered into something larger — which, embarrassingly, is what an earlier version of this did before we caught it.

Text stays sharp down to the point where resolution runs out. Scanned documents compress much further than text-only ones, because there is more redundancy to remove.

Why we care about this one

We build in a structural engineering office. Inspection reports go to a national procurement portal with a hard attachment limit, and the drawings inside them are heavy. We wrote this because we were the ones sitting there at 5 PM watching an upload bar fail.

pdf300.com — free, no sign-up.


경북 포항에서 건축구조 일을 합니다. 현장에서 겪은 것을 적어 둡니다.
일하다 필요해서 만든 도구도 몇 가지 열어 두었습니다 — ledeuxions.com · PDF 다루는 것은 pdf300.com

댓글

이 블로그의 인기 게시물

[Journal LeDeuxions] AI-인간 시스템의 인지 사고: '싱크로 가속 트랩(Sync-Acceleration Trap)'의 발견

[발견] AI-인간의 시스템적 인지 사고: '싱크로 가속 트랩(Sync-Acceleration Trap)

사용자 친화적 AI 인터랙션이 인간 판단 논리를 가속·왜곡하는 현상에 대한 관찰