Thank you, Shri Tyagi for your f-droid OCR app. The pics shared with the app shows an incorrect output:
The र्म in धर्मस्य is dropped and is output as धस्य. There are other similar errors.
I would like, without casting any doubt on your ability as a programmer, to add that with Sanskrit you could try different standard texts and polish your software.
Thanks once again.
Best wishes