PDFPhotoTools

Why Hindi text copied from a PDF turns to gibberish, and how to fix it

You have a Hindi circular, a question paper or a court order as a PDF. You select a paragraph, copy it into WhatsApp or Word, and get either nothing, or something like "fgUnh esa", or Hindi with the matras in the wrong places. The PDF looks perfect on screen, so this feels like a bug. It is not. There are three different causes, and each has its own fix.

Reason 1: it is a scan, so there is no text

Many government notices are printed, signed, stamped and then scanned. The PDF is just photographs of pages. When you try to select, nothing highlights, or the whole page highlights as one block.

Fix: run it through Indian Language OCR. Pick Hindi, and English as well if the page has both. The tool reads the words from the picture and adds them as a hidden text layer. The page looks the same, but now you can select and copy Hindi, or take all of it at once with PDF to Text.

On a clean printed page, most words come out right. Faded photocopies, stamps over the text and very small print cause mistakes, so read the result before you use it, especially names and numbers.

Reason 2: it was typed in an old Hindi font like Kruti Dev

Before Unicode Hindi became common, most Hindi typing in offices and DTP shops was done in fonts such as Kruti Dev and DevLys. These fonts draw Hindi letters, but what is stored underneath are ordinary English keys. The font simply shows "f" as ि, "g" as ह and so on. So "हिन्दी" is stored as something like "fgUnh".

When you copy, you get the stored English keys, not what you see. Plenty of state government and court PDFs are still made this way.

Fix: read the page as a picture instead of copying its broken text.

  1. Turn the pages you need into images with PDF to JPG.
  2. Open Image to Text, add the images (up to 20 at a time) and pick Hindi.
  3. Copy the text, or download it as a .txt file.

The OCR tools skip pages that already have text, which is why this route through images is needed for these files.

Reason 3: Unicode Hindi, but the matras jump around

Even a PDF made with a proper Unicode Hindi font can copy badly. Hindi letters are joined and reordered when they are drawn: the ि matra is drawn before the letter it belongs to, and half letters are joined into one shape. Depending on how the PDF was made, copying may give you the shapes in drawing order, so ि lands on the wrong letter or conjuncts split apart.

Fix: first try PDF to Text. If the result is mostly fine with a few broken words, correct those by hand. If it is broken throughout, use the PDF to JPG and Image to Text route above, which reads the words as they look on the page.

Getting better results

  • Choose every language on the page. A bilingual form needs both Hindi and English selected.
  • For a crooked scan, straighten it with Deskew Scan before OCR. Straight lines read better.
  • Check numbers, dates and names against the original. That is where OCR mistakes hurt most.

All of this happens in your browser. The language data, 1 to 3 MB per language, downloads from this site the first time and then stays in your browser. Your document is not uploaded.

Tools in this guide

More guides

esc