DEV Community

Pranav Mailarpawar
Pranav Mailarpawar

Posted on

Scan Any Document to a Searchable PDF For Free, Right in Your Browser

If you've ever had a printed contract, a handwritten note, or a physical receipt that you desperately needed as a PDF — and found yourself wrestling with apps that either upload your files to some random server, slap a watermark on the result, or charge you after three free scans — you know the frustration.
There's a better way. It's called ihatepdf.cv, and it runs entirely in your browser.

What ihatepdf.cv Actually Does
ihatepdf.cv is a free browser-based document scanner. You open it, point your phone or laptop camera at a piece of paper, and it spits out a clean, flat, searchable PDF — with no account required, no file ever leaving your device, and absolutely no watermark.
It's the kind of tool that should have always existed. Here's what happens under the hood when you hit that shutter button.

Step 1: It Detects the Document Edges Automatically
The moment you capture a frame, ihatepdf.cv runs an edge-detection algorithm directly in JavaScript — no computer vision library, no WebAssembly blob to download. It applies a Gaussian blur to reduce noise, then runs a Sobel operator across the image to find where brightness changes sharply (i.e., where your document meets the desk or background).
The four corners of your document are estimated from those edge points and shown as draggable handles on screen. Most of the time the auto-detect is spot on. When it isn't, you just drag the corners yourself — and a little magnifying loupe pops up under your finger so you can place them with pixel-level precision.

Step 2: Perspective Correction (The Magic Part)
This is what separates a real document scanner from just "taking a photo." Even if your paper is at an angle — tilted 20 degrees, shot from the side — ihatepdf.cv mathematically flattens it.
It computes a homography matrix: a transformation that maps your four selected corners to a perfect rectangle. Then it walks every pixel of the output image backwards through that transformation to find where it came from in the original photo. The result is a flat, de-skewed document that looks like it came off a flatbed scanner.
No OpenCV. No server. Eight equations, eight unknowns, solved in JavaScript.

Step 3: Enhancement — Make It Actually Readable
Raw camera images are often too soft or too grey for OCR to work well. ihatepdf.cv gives you five one-tap presets:

Original — untouched, exactly what the camera saw
Document — boosted contrast and brightness, great for printed text
B&W — full greyscale with heavy contrast, sharp black text on white
Whiteboard — aggressive brightness lift for whiteboard photos
Photo — gentle enhancement for mixed-content pages

You can also fine-tune brightness and contrast manually with sliders. Any preset can be applied to all pages in one tap — useful when you're scanning a multi-page document in the same lighting conditions.

Step 4: OCR — Turn Your Scan Into a Searchable PDF
This is the feature that makes the output genuinely useful rather than just a pretty image. After you've captured and adjusted your pages, hitting "Scan & Extract Text" fires up Tesseract.js — an open-source OCR engine that runs locally in your browser.
It supports 17 languages including English, Hindi, French, German, Arabic, Chinese, Japanese, Korean, and more. Set it to Auto and it detects the script automatically from your first page.
Before OCR runs, ihatepdf.cv preprocesses each image:

Normalises the contrast range so faint text becomes visible
Sharpens edges with a Laplacian filter
Upscales small images to the sweet spot for Tesseract accuracy (~1800px)
If confidence is low, automatically retries on a binarised (black and white) version

The extracted words, along with their exact positions on the page, are embedded as an invisible text layer in the final PDF — white text sitting just underneath the image. The document looks exactly like your scan, but you can select text, search with Ctrl+F, and have it indexed by any search engine or document manager.

Step 5: Export Options That Don't Hold You Hostage
Once processed, you get:

Download as PDF — a proper searchable PDF, no watermark, no size limit other than your device's memory
Download as .txt — the raw extracted text, useful for pasting into other documents
Copy text — one tap to clipboard
Share — on mobile, triggers the native share sheet so you can AirDrop, send via WhatsApp, email it, whatever

There's also a merge feature: if you already have an existing PDF, you can load it and choose whether your new scan goes before or after it. Useful when you're adding pages to a report or combining a handwritten note with a typed document.

Multi-Page and Batch Scanning
Single-page scanning is the easy case. ihatepdf.cv handles multi-page documents too.
After each capture, you land back in a review screen where your pages appear as a scrollable thumbnail strip. Tap any thumbnail to preview it full-screen. Drag thumbnails to reorder pages. Long-press for a context menu that lets you rotate, replace, move, or delete individual pages. Swipe left and right on the preview to navigate between pages.
For situations where you need to quickly capture a stack of documents, Batch mode lets you keep the camera open and shoot as many frames as you want. You then review all captures at once, edit corners on any that need it, and add everything to your document in a single step.
A small coloured dot on each thumbnail gives you a blur quality score — green means sharp, amber is borderline, red means you should retake it. It's a small thing, but it saves you from building a 20-page PDF only to find page 7 is unreadable.

Why "No Upload" Actually Matters
Most online PDF tools — even the free ones — route your files through a server. That's fine for a grocery receipt. It's less fine for:

Medical records
Legal contracts
Financial statements
ID documents
Confidential work files

ihatepdf.cv processes everything on your device. The image never leaves. There's no server log of what you scanned, no storage bucket somewhere holding your documents, no terms of service clause about training AI on your uploads.
This isn't a privacy marketing line. It's just what happens when you do image processing in JavaScript on a canvas element. The data literally cannot go anywhere because there's nowhere to send it.

Works Without an Internet Connection
Once the page loads, ihatepdf.cv works offline. The OCR language models are fetched on first use and cached by the browser. After that, you could put your phone in airplane mode and scan a full document to a searchable PDF without any network activity.
This matters more than it sounds. You're scanning in a basement. On a plane. In a client meeting where pulling out your phone to use some cloud service looks unprofessional. ihatepdf.cv doesn't care.

Import From Your Gallery Too
Don't have something in front of you to scan right now? You can import existing photos from your camera roll. ihatepdf.cv runs the same edge detection and perspective correction on imported images, automatically applies the Document filter, and adds them to your page stack just like a live capture.
This is useful for: photos you already took of a whiteboard, photos of receipts sent to you by someone else, or images of documents you photographed earlier without a scanning app.

The Short Version
If you need to turn a physical document into a PDF and you want it to be:

Free
Searchable
Watermark-free
Private (nothing uploaded)
Available offline
Multi-language
Multi-page

— ihatepdf.cv does all of that. In your browser. Right now.
No sign-up. No install. Try ihatepdf.cv now →

Top comments (0)