i hate pdf Files do not leave this computer

Manual

i hate pdf is a desk for PDFs, photos and text. You put files on it, do what you need with the pages and save the result. Your browser does all the work. Below: how it works, what is guaranteed and what cannot be.

How it works

  1. Drop files on the page or press "Choose files". PDFs, photos (PNG, JPEG, WebP and others) and text (TXT, Markdown) are accepted. Photos and text become pages at once.
  2. Every page is a card on the desk. Select cards, rotate them, delete them, drag them to another place or into another file. Actions for a whole file are in the "File" row: merge, split, numbers, stamp, compress, read text, metadata, format.
  3. Every action becomes a step in the list on the right. A step can be changed or removed; the result is computed again. Ctrl/⌘ Z undoes the last action, all the way back to the start.
  4. The desk shows the result as it will be. Nothing happens to the originals.
  5. "Save result" builds new files and hands them over as an ordinary download.

To redact something, fill a form or place a signature, open the page: double-click a card or press Enter.

No file at hand? Press "Try a sample" on the empty desk and pick one. A short list of things to try appears next to it; you can hide it, and it is never shown for your own files.

Every name, company, code, account, phone and address in the samples is invented: the companies are called "Демо…", the company codes start with 99, the bank does not exist. A sample is loaded from this same site only when you pick it, and works offline after that.

What is guaranteed and what is not

Guaranteed

  • Files do not leave the computer. The site is a set of static files. There is no server code that accepts files. To check: open the developer tools, the Network tab, and work. Requests go only for the site's own files: code, fonts, the recognition model. No request carries your document. Or turn the network off after the first visit: everything keeps working.
  • The original is not changed. The result is always a new file.
  • A deleted page does not stay in the file. The result is built from scratch from copies of the pages you kept. Links to pages that are no longer in the file are cut, and everything nothing points to is removed.
  • Redaction removes data; it does not cover it. Details are in the section below. After saving, the finished file is checked and you see the outcome.
  • No accounts, cookies or analytics. The browser stores only what you saved yourself: recipes, the theme, a signature (if you ticked the box).

Not guaranteed

  • Redaction acts where you drew it. If the same name is on another page, in the file name or in the metadata, remove it there too. For metadata there is the "Metadata" step.
  • The size of the black box is visible. It hints at the length of the removed word.
  • The "pixelate" look leaves a coarse mosaic. For real secrets use the black box.
  • Text recognition makes mistakes. Check names, numbers and dates.
  • The signature is a picture. It is not a qualified electronic signature and does not replace one.
  • Document hints are rules, not knowledge. The type, the requisites and the file name are guessed from the text. Check them.
  • A file with a password will not open. Remove the password in the program that made the file.

Redaction

Open a page, choose "Redact" and draw over the area. When you save, the tool does this:

Then comes the check. The finished file is opened again, its text is extracted, and no character may lie inside an area. In the browser the area is also drawn without the black box: it must be a flat background. You see the outcome as one line: "Checked: there is no text under the 3 redacted areas".

When a page becomes a picture

Some pages cannot be edited this way: a font without a width table, content inside a nested block, an image in a rare format (JBIG2, JPEG 2000, CCITT), visible graphics under the area. Then the whole page is turned into a 200 dpi picture with the area painted over. Such a page has no text at all any more, and the result says so plainly and names the reason. The "pixelate" look always works this way.

What the check does not see

Lines that only cross the area (a table border) stay: they are not text. If more than 12% of the pixels under the area are not background, the page becomes a picture. The check does not look for the same text elsewhere in the document.

Fill and sign

If a PDF has form fields, they become inputs on the open page: text, check boxes, radio buttons, lists. The fields can stay editable or be locked: then the values become part of the page.

If there are no fields, place text, a date or a check mark anywhere: choose the tool and click on the page. An item can be moved, resized and removed.

A signature can be drawn with the mouse or a finger, typed, or taken from a picture (a white background becomes transparent). It is stored in the browser only if you tick "Remember". This is a visual signature. It has no legal force of a qualified electronic signature.

Text recognition

The "Read text (OCR)" step reads the text on scans and lays it as an invisible layer over the picture: you can search and select text in the file. Pages that already have text are left alone. The "text", Word, Markdown and EPUB formats run recognition on scans by themselves.

The engine and the language model (Ukrainian and English, about 7.5 MB) are loaded from this same site on the first recognition, with a progress line. The more accurate model is about 25 MB. After that everything works offline.

Say it in words

In the line at the top you can write what to do: "merge these, drop blank pages, number from page 3, compress for email". The sentence is read by an ordinary table of rules in your browser, in Ukrainian and English. There is no model and no network here. First you see how you were understood, and only then you confirm. What the tool did not understand is shown separately and is not guessed.

Dictation is off until you turn it on. It uses the speech recognition of the browser itself. Chrome, Edge and Safari may send the voice recording to Google, Microsoft or Apple servers. Files go nowhere.

Recipes

A recipe is a saved list of steps. Press "Save as a recipe", give it a name, and next time the same set of actions runs with one click on other files. Recipes live in this browser. A recipe can be saved to a small JSON file and passed to a colleague. Built-in recipes and all operations are on the "Operations and recipes" page.

Offline and as an app

On the first visit the browser stores the site itself: pages, code, fonts and libraries, about 6.5 MB in all. After that the site opens and works without a network. The recognition data (7.5 MB) and the extractor for Word and Markdown (5 MB) are stored on first use.

In Chrome and Edge the site can be installed as an app: the "Install" button in the address bar. Such an app can open PDFs straight from the file manager. In Safari on a Mac: "File → Add to Dock".

Keys

KeyAction
← → ↑ ↓move the cursor over pages
Spaceselect or deselect a page
Shift + arrowsselect several in a row
Ctrl/⌘ A, Escselect all, clear the selection
R, Shift Rrotate clockwise, back
Delete, D, B, Xdelete, duplicate, blank page after, selected into a new file
Alt ←, Alt →move selected pages
Enteropen the page; there 1-6 pick a tool
M, /, ?merge, write an action in words, show the keys
Ctrl/⌘ Z, Shift Ctrl/⌘ Zundo, redo
Ctrl/⌘ S, Ctrl/⌘ Osave the result, add files

For scripts and agents: window.ihatepdf

The same operations are available from code on the page. This suits an agent that drives a browser, and your own scripts in the console. There is no server behind it: everything runs in this tab.

// what it can do
ihatepdf.operations()      // [{ op, title, about, params: [{ name, type, default, choices }] }]
ihatepdf.recipes()         // built-in recipes and the ones saved in this browser

// a sentence -> steps. no model, no network
ihatepdf.parse("merge these, number from page 3")
// { steps: [{ op: "merge", params: {} }, { op: "number", params: { from: 3 } }], unknown: [], notes: [] }

// a plan + files -> files. the desk on the screen is not touched
const { files, report } = await ihatepdf.apply(
  [{ op: "merge" }, { op: "delete", params: { pages: "blank" } }, { op: "compress", params: { targetMB: 5 } }],
  [fileA, fileB])          // File, Blob, or { name, bytes } / { name, text }
files[0].name; files[0].blob; files[0].size
report.notes               // what happened: compressed, pictures, ocr ...
report.redaction           // the proof after a redact step

// the desk a person sees
await ihatepdf.desk.addFiles([file])
ihatepdf.desk.addStep("rotate", { pages: "1-2", angle: 90 })
ihatepdf.desk.setPlan({ steps: [{ op: "ocr" }] })
ihatepdf.desk.state()      // { files: [{ name, format, pages }], steps: ["..."], errors: [], selected }
await ihatepdf.desk.save() // { files, report } without a download dialog
ihatepdf.desk.undo(); ihatepdf.desk.redo(); ihatepdf.desk.clear()
ihatepdf.samples()         // the built-in samples of made-up documents: [{ id, name, pages, bytes, files, actions }]
await ihatepdf.desk.loadSample("invoices") // one of them by id; no id is the big pack, and ihatepdf.sample() says what is on which of its pages

The plan

A plan is plain JSON: { "steps": [{ "op": "rotate", "params": { "pages": "1-3", "angle": 90 } }] }. Steps run in order. ihatepdf.operations() returns the list of operations with their parameters; the same list is on the "Operations and recipes" page.

Limits