How to edit Urdu text in a PDF on Android

Editing Urdu text in a PDF is notoriously difficult. If you've tried it, you already know what happens: the letters disconnect, the words flip backwards, and the beautiful Nastaliq script turns into unreadable garbage.

Why is it so hard?

Urdu, Arabic, and Persian rely on complex text shaping. Letters change shape depending on whether they are at the beginning, middle, or end of a word (ligatures). Furthermore, they are written right-to-left (RTL). Most PDF editors were built for English (left-to-right, no ligatures) and simply do not understand how to properly render or edit RTL scripts in the PDF format. When you try to add or change a word, the editor just dumps the raw Unicode characters left-to-right, mangling the text.

For a deeper look at what goes wrong inside the file, see why Urdu and Arabic text breaks when you edit a PDF.

The solution

Editrix PDF was built from the ground up with proper complex text layout support. It understands Nastaliq ligatures, glyph shaping, and right-to-left formatting natively.

Show, don't tell:

Other Editors

م ی ح ر ل ا ن م ح ر ل ا ه ل ل ا م س ب

Letters are disconnected and left-to-right.

Editrix PDF

بسم الله الرحمن الرحيم

Perfect shaping and ligatures.

How to do it:

  1. Open your PDF in Editrix PDF.
  2. Tap on the text you want to edit.
  3. Type your new text. The app handles the shaping automatically.
  4. Save.

What "handles the shaping" actually means

It is worth being specific, because this is the part that separates a PDF editor that works with Urdu from one that merely claims to.

A PDF does not store words. It stores glyphs - individual drawing instructions - positioned at fixed coordinates on the page, along with a table mapping each glyph back to a character. In an Urdu document, a single word like سکتی may be one ligature glyph, not four letter glyphs. When you retype that word, the editor has to work out which glyphs the new text needs, find them in the embedded font, and place them right-to-left at the correct positions.

Editrix runs the text through HarfBuzz, the same open-source shaping engine used by Android, Chrome and LibreOffice. HarfBuzz reads the font's own OpenType rules and decides which ligature and contextual forms to use. Editrix then writes those exact glyph ids back into the PDF, preserving the ligatures the original document used rather than substituting a generic fallback.

Two details matter in practice:

  • The original font is kept where possible. If the PDF embeds a Nastaliq font, your edit is drawn in that font, so new text matches the surrounding page instead of jumping to a different typeface.
  • Vertical stacking is preserved. Nastaliq glyphs sit on a steep diagonal and can stack well above the baseline. Editrix carries those positioning offsets through the edit, which is why a corrected word still sits on the same slope as the rest of the line.

Mixed Urdu and English in one line

Documents rarely contain only Urdu. Dates, product codes, email addresses and numbers are usually Latin, embedded inside a right-to-left sentence. That mixture is where many editors fail even when they handle pure Urdu correctly: the Latin run gets reversed along with the Urdu, so an email address comes out backwards.

Editrix applies the bidirectional algorithm per run rather than per line, so the Urdu reverses and the Latin does not. If you edit a line containing both, each keeps its own direction.

What this does not fix

Being straight about the limits, because a tool that claims everything is a tool you cannot trust:

  • Scanned documents. If your PDF is a photograph of a page, there is no text to edit - only an image. Run OCR first to get selectable text, and note that Urdu OCR accuracy is far behind Latin.
  • Fonts that are not embedded. If the document references an Urdu font that was never embedded, the glyphs are not in the file and a substitute has to be used. Your edit will be readable but may not match the original exactly.
  • Reflowing a paragraph. Editing replaces text in place. Making a line substantially longer will not rewrap the surrounding paragraph the way a word processor would.

When another tool is better

If you are rewriting a long document from scratch, convert it to Word, edit on a desktop, and export back to PDF - that is what a word processor is for. Editrix is the better choice when the document must stay as it is and you need to change part of it: fixing a typo in a certificate, correcting a name on a form, updating a date on an official letter, or filling a government form on your phone.