r/IndoAryan • • 19h ago

Script We tested legacy Hindi font (Kruti Dev) PDF → Word conversion on a 25-page government Act. Here's what survived and what didn't.

4 Upvotes

Disclosure: IndicPDF, a tool that converts Indian-language PDFs to editable Unicode. This post is about the problem, with our own results, including what we still get wrong.

The problem

Millions of Hindi documents (court papers, government Acts, books) were typeset in old fonts like Kruti Dev. They look like Hindi on screen, but the text underneath is Latin letters mapped to Hindi shapes. Copy a line and you get something like:

\\\`vkt ge cgqr \\\[kq'k gSa\\\`

when it should read:

\\\`आज हम बहुत खुश हैं\\\`

You can't search these files, edit them, or paste them anywhere without the text turning to junk. Many "Hindi PDF to Word" tools just copy these codes into Word, so the output looks broken the moment the font changes.

The test

We used pages 1–25 of a Bihar state Act: legal Hindi, numbered sections, nested lists like (क)…(छ), and a running header on every page.

What worked

\\- About 64,000 Devanagari characters recovered as real Unicode text. It is searchable and copyable, and it works in any font.

\\- Section numbers and Hindi legal terms came through correctly.

What didn't work (yet)

\\- The running header at the top of each page is missing.

\\- Bold section headings lost their bold, and some run on after the previous paragraph.

\\- A few list items merged together.

\\- The output is 26 pages instead of 25.

\\- One real text loss: "(2) उपधारा (1)" came out as "धारा (1)". This is the one that bothers us most, because for a legal document a missing word matters more than any formatting problem. It's our top fix.

What we learned

Happy to answer questions about how legacy Indic fonts work under the hood. If you have a tricky Hindi, Telugu, Tamil or other Indic PDF that nothing handles well, I'd genuinely like to test it.