oPDF
All posts

Select, translate — all on your own computer

When you read a paper, a contract or a manual in a language you're less fluent in, the unfamiliar word is rarely what breaks your focus. Looking it up is: copy the paragraph, switch to a browser, paste it into a translation site, read, switch back, and find the line you were on.

oPDF can now translate right on the page.

How it works

Select some text and the usual toolbar appears next to it — copy, highlight, underline, strikethrough — now with a Translate button at the right end. Click it and the translation streams into a panel just below the selection.

Select a paragraph, click the translate button at the end of the toolbar, and the translation appears right below.

A few details:

  • No setup. Text is translated into the language of the app's interface — Chinese for a Chinese UI, English for an English one.
  • Already in that language? It goes to English. Select Chinese text in a Chinese UI and you get English, not the same text back. Chinese, Japanese and Korean are recognised from the script itself.
  • Want another language? Pick one in the top-left corner of the panel; oPDF remembers it. 38 languages are supported.
  • Formatting survives. Line breaks in the original are kept, and the translation is rendered as Markdown, so paragraphs and lists stay paragraphs and lists.
  • One click to copy the translation, top right of the panel.

Annotation animation: understand first, then read the translation

A full translation is great for getting the gist. If you're reading papers to improve your English, or want to see why a sentence is translated the way it is, click the annotation button in the panel to turn on the annotation animation.

oPDF then reads the selection first and picks out the words, phrases and sentence patterns worth knowing. It marks them on the page in the same styles as your own annotations — highlight, underline, squiggle — and draws a leader line from each to a small card saying whether it's a word, a phrase or a pattern, and what it means here.

Cards go to the left, right or top of the paragraph, whichever side is closest to their word, keeping lines from crossing and the area below free for the translation. Once everything has landed, the full translation follows.

With the annotation animation on: “trace”, “record” and “repeatedly fail to do so” are marked on the page first, then the full translation appears.

The animation is off by default and the toggle is remembered. Turn it off when you just want the meaning, and you're back to the straight translation from the first video.

It all happens on your computer

Translation runs on a small model installed on your machine, not an online service:

  • The first time you click Translate, oPDF offers to download the model — about 1.3 GB, once. As with the layout analysis model, you can choose HuggingFace or ModelScope as the source under Settings → Plugins.
  • Every translation after that runs locally. The text you select never leaves your computer. No account, no API key, no per-word pricing, and it works offline.
  • The default model is Index-Translate-2B; you can switch to Tencent Hunyuan's Hy-MT2-1.8B under Plugins.
  • The model runs on your GPU — Metal on Mac, Vulkan on Windows. It loads only when you use it and is released after 5 idle minutes, so it isn't holding on to memory in the background.
  • How much you can translate at once depends on what the model can handle: roughly 4,000 characters of English or 1,000 Chinese characters. Select more and oPDF will ask you to shorten the selection.

One more thing

Small models get things wrong now and then. If you hit an awkward translation, send me the original and the result — the address is on the support page, and every email gets read.