DEV Community

nikoo li
nikoo li

Posted on

Compressing PDFs to a target file size instead of guessing quality presets

When a PDF is too large, the real requirement is often not “make it smaller.”

It is usually more concrete:

  • the job portal says the file must be under 10 MB
  • the school form rejects anything above 5 MB
  • the client upload system has a 20 MB limit
  • an email attachment fails at the last step

That is why I built TinyPDF as a small target-size PDF compressor:

https://tinypdf.cn/

Instead of choosing “low / medium / high” compression and checking the result manually, the workflow is:

  1. Upload one PDF
  2. Enter the target size in MB
  3. Let the tool try to compress under that limit
  4. Download the result

The implementation goal is to preserve page count, page dimensions, and layout whenever possible. If the PDF is image-heavy and the target is very small, there is always a quality tradeoff, so the UI tries to keep that expectation clear.

This is a narrow tool by design. It does not merge, split, edit, OCR, or sign PDFs. It only focuses on one annoying workflow: “this file needs to be under a specific size.”

I am sharing it here because I would like feedback from people who deal with document uploads in real workflows:

  • Is target-size compression clearer than quality presets?
  • What file limits do you see most often?
  • What privacy details should be visible before upload?

Top comments (0)