How to Translate a PDF to Persian: Check Yeh, Kaf, and the Half-Space
A Persian PDF can look right and still fail search. Five sample files show how Arabic yeh and kaf, lost half-spaces, and wrong digits slip through.

To translate a PDF to Persian, translate a short test section first, then check four characters in the result: the letter yeh (ی), the letter kaf (ک), the half-space inside words like کتابها, and the digits. Each has an Arabic look-alike or a near miss that can appear on the page without anyone noticing, and each one breaks search. A reader who types کتاب on a standard Persian keyboard will not find a کتاب stored with the Arabic kaf, even though the two look the same in most positions.
That is the difference from Arabic. The usual Arabic problem is how letters are shaped and ordered. For Persian, the more common problem is which letters are stored at all, because Persian shares a script with Arabic but uses some of its own characters.
The four characters Persian does not share with Arabic
| What | Persian | Arabic look-alike | Where the difference shows on the page |
|---|---|---|---|
| Yeh | ی (U+06CC) | ي (U+064A) | At the end of a word only. Arabic yeh keeps its two dots there, Persian yeh drops them |
| Kaf | ک (U+06A9) | ك (U+0643) | Usually only at the end of a word, depending on the font |
| Half-space | Zero width non-joiner (U+200C) between parts of a word | A full space, or nothing | A visible gap, or letters that join when they should not |
| Digits | ۰ to ۹ (U+06F0 to U+06F9) | ٠ to ٩ (U+0660 to U+0669) | Only in 4, 5, 6, and 7 |
The Unicode Standard's Arabic chapter describes three of these: Farsi yeh loses its dots in final and isolated forms while Arabic yeh keeps them, Persian and Urdu use a separate digit sequence with different shapes for four, five, six, and seven, and the zero width non-joiner is what keeps the Persian plural suffix from joining the word before it. Persian writers call that last character the half-space (نیمفاصله).
Because the visible differences are limited to some positions, a reviewer scanning the page will miss most of them. The text has to be checked as text.
Five PDFs with the same three sentences
We built five small PDFs that differ only in which characters they store. Each holds the same three Persian lines: "I read these books in 1403", "I want to translate chapter 4 again", and "The UNESCO report is on page 56". They contain two half-spaces, Persian yeh and kaf, a year, two other numbers, and a Latin name. All five were printed to PDF by Chrome's rendering engine (Chromium 156) with the Tahoma font, so the production method is the same for all of them.
| Sample | What it stores | What a reader sees |
|---|---|---|
| A | Correct Persian | Correct |
| B | Arabic yeh and kaf in place of Persian | One of the four yeh and kaf letters looks different: می shows two dots under its yeh |
| C | A space in place of each half-space | کتاب ها and می خواهم, with gaps |
| D | Each half-space removed | کتابها and میخواهم, joined |
| E | Arabic-Indic digits in place of Persian | ٤ for ۴ and ٥٦ for ۵۶. The year looks almost the same |
We then extracted the text with four common PDF libraries and searched each file for words typed with Persian characters: کتاب, کتابها, میخواهم, کنم, the year ۱۴۰۳, the number ۵۶, and UNESCO. The tools were the pdftotext 26.08 command-line tool, PyMuPDF 2.1, pypdf 7.0.0, and PDFium through pypdfium2 5.15.1. PDFium is the engine behind Chrome's PDF viewer. We ran this on November 8, 2026. We did not click through a PDF viewer, did not test Acrobat or Preview, and used one font, so treat the results as proof that these failures exist rather than a measure of how often they happen.
What the searches found
Sample B fails every Persian word search. The file holds ي and ك, the searches use ی and ک, and to a computer those are different characters. In all four tools, کتاب, کنم, کتابها, and میخواهم found nothing. Depending on the tool, at most the numbers and UNESCO matched. On the page, three of the four substituted letters look exactly like the Persian ones.
Samples C and D break the words that have a half-space. A search for کتابها or میخواهم found nothing in either file, in any tool. The base word کتاب still matched in pdftotext and PyMuPDF, and in PDFium for sample C. Sample C at least shows its gaps. Sample D can pass a quick look, because joined forms such as کتابها are a common variant spelling, but it still fails a search for the standard form.
Sample E fails every number search. ۱۴۰۳ and ۵۶ found nothing in any tool, while the words matched as they did in sample A. Since 0, 1, 2, and 3 look the same in both digit sets, a year like ۱۴۰۳ differs only in its 4, which is easy to miss.
Sample A, the correct file, depends on the tool. pdftotext found all seven search terms and kept both half-spaces. PyMuPDF found every word but returned the year's digits out of order, so the year search failed. PDFium dropped both half-spaces and returned 7 of the 14 Persian words we tried in reverse letter order, including کتاب, این, and ترجمه, so a search for any of them failed. pypdf returned the text as Arabic presentation forms, the stored-shape characters that ordinary searches do not match, and wrote the year with a mix of Persian and Arabic-Indic digits.
So even a perfectly typed Persian PDF can lose its half-spaces or word order in one application and not another. You cannot fix that in the translation. What you can control is that the file stores the right characters, which samples B to E show is not guaranteed.
The checks to run on your translated PDF
Run these on the real output, in the application your readers will use.
- Read a few final letters. Look at words that end in yeh or kaf, such as می or یک. Two dots under a final yeh, or a mark inside a final kaf, means Arabic letters were used.
- Search for words typed on a Persian keyboard. Use at least five words from different lines, including one ordinary word with ی and ک, one word with a half-space such as the plural ـها, and one number with a 4, 5, or 6 in it. Type them yourself rather than copying them from the PDF, because a copied word carries the same wrong characters and will always match.
- Copy one paragraph into a plain text editor. Check that words are in order and that half-space words did not split or fuse.
- Count the characters if you cannot read Persian. With poppler's
pdftotextinstalled, save this ascount_fa.py:
import sys
t = sys.stdin.read()
checks = [
("Persian yeh", "ی"), ("Arabic yeh", "ي"),
("Persian kaf", "ک"), ("Arabic kaf", "ك"),
("half-spaces", ""),
("Persian digits", "۰۱۲۳۴۵۶۷۸۹"),
("Arabic-Indic digits", "٠١٢٣٤٥٦٧٨٩"),
]
for name, chars in checks:
print(name + ":", sum(t.count(c) for c in chars))
forms = sum(0xFB50 <= ord(c) <= 0xFDFF or 0xFE70 <= ord(c) <= 0xFEFC for c in t)
print("presentation forms:", forms)
Then run pdftotext translated.pdf - | python3 count_fa.py. For a Persian document, the Arabic yeh, Arabic kaf, and Arabic-Indic digit counts should be zero or close to it, and a long text should have many half-spaces. Our sample B returned 0 Persian yeh and 2 Arabic yeh, sample C returned 0 half-spaces, and sample E returned 0 Persian digits and 7 Arabic-Indic ones. If the presentation-form count is high, the letter counts will be too low to trust, because those letters are stored as shapes. The Arabic PDF guide explains that failure. The script cannot judge meaning, so have a Persian reader check the translation itself.
For layout, page direction, and print checks that apply to every right-to-left language, use the RTL book translation guide. For everything else, use the PDF translation QA checklist.
When to fix it, and when to leave it
| What the PDF is for | What to require |
|---|---|
| Reading on screen | The page reads correctly to a Persian reader. A sample B or E file can be acceptable |
| Searching a long document | Persian yeh and kaf, half-spaces, and Persian digits, confirmed by typed searches in the readers' application |
| Quoting or reusing the text | The same, plus checking each quote against the page |
Do not fix Arabic letters with a blanket find and replace across a whole document. Persian texts quote Arabic, such as Quranic verses, hadith, or Arabic titles, and those passages should keep Arabic yeh and kaf. Replace only in the Persian passages, or have a reviewer check each change.
It is also hard to fix characters inside a finished PDF. If the checks fail, retranslate from a source you can edit. If you have the original as a Word file, translating the Word document instead gives you a file where search and replace are easy, and you can make the PDF afterward. If you only need clean text from a PDF you already have, the copy and paste guide covers extraction options.
Translating with BookTranslator
BookTranslator's PDF translator lists Farsi with Arabic, Hebrew, and Urdu as supported right-to-left targets.
One current limitation matters here. Our PDF output draws Persian with shaped letter forms and records which characters those shapes stand for. In the version released as of November 8, 2026, that record can store the shaped forms rather than the base letters, the pattern described in the Arabic guide. In that case search and copy work in some applications and not others. A fix that records base letters, and that prefers Persian yeh and kaf over their Arabic look-alikes when the target language is Persian, is merged in our code but not yet released. If you mainly need to read the result, this may not affect you. If you need search or copy, test that first. We checked only the standard PDF output path here, not OCR Mode.
We did not run a BookTranslator task on the five samples above. Upload a short test section, inspect the price, and run the four checks on the result before you translate the full file. To compare other tools, see the PDF translation tools comparison.
Related Posts





