Viewing Sanskrit/Hindi documents on ipod Touch/iPhone

Ipod Touch/iPhone OS does not seem to have the ability to render ‘complex script’ languages like Sanskrit/Hindi. So the default applications like Safari or applications that rely on iPhone OS font rendering ability do not show Sanskrit/Hindi documents/web pages properly.

http://ifiddling.blogspot.com/2009/01/hindi-is-broken-on-iphone-as-of-22.html gives a pretty detailed account of the problem but does not mention the phrase 'complex script'. It has links to images showing iphone browser not rendering Hindi and Telugu web pages properly!!! For convenience I am giving those links here as well: Hindi on iPhone problem, Telugu on iPhone problem

http://en.wikipedia.org/wiki/Wikipedia:Enabling_complex_text_support_for_Indic_scripts#Mac_OS_X is a great page explaining 'complex script' Indic language issue.

Sanskrit PDF Rendered Properly

Fortunately Sanskrit/Hindi PDF files are rendered properly by Safari as well as PDF reader apps (I checked out FileApp & GoodReader). Perhaps the embedded fonts of the PDF are rendered using a custom font engine by these applications instead of using the iPhone OS facility. Note that FileApp is a free app and GoodReader costs 99 cents as of now. I have been extremely happy with GoodReader and I feel it is an unbelievably great buy at 99 cents!!!

However the PDF documents page width is usually set to desktop size and this requires horizontal scrolling to read every line, which is very cumbersome. The ‘Reflow’ facility provided by PDF reader apps works well with English documents where the content is automatically resized to ipod touch size and shown as text in a single font.

But ‘Reflow’ fails miserably for Sanskrit/Hindi. The characters rendered in ‘reflow mode’ are unreadable. I believe that a single font is used to render the text in ‘reflow mode’. The font is typically an English font that does not map properly to the Sanskrit font and so the characters come up as unreadable. But even if one uses PDF documents with fonts like Arial Unicode which, it seems, handles both English and Sanskrit, the font engine of iphone OS is used to render the font (in ‘reflow’ mode) and that trips up on the ‘complex script’ issue. Another issue would be the need to install the Sanskrit font on the ipod touch if it does not have it by default.

GoodReader alleviates the scrolling issue (in regular PDF mode as against ‘reflow’ mode) by scrolling one screenful horizontally on a single tap. But even then the tap-dance to read every line is just too much of a bother.

I was stuck at this point for quite some time. I tried hard to get a solution where I can just copy a ‘desktop page-sized’ Sanskrit/Hindi pdf onto the ipod touch and read it without scrolling. But I could not get a solution.

Resizing PDF to ipod Touch/iphone size

The only solution to this Sanskrit/Hindi PDF problem that I could see was to resize them to the size of the ipod Touch. For resizing them I first copy pasted the data into Word (on Win XP). Then I changed the page size and margins. Word reflowed the data very well. I must appreciate the fantastic support Microsoft Windows XP and Word have for Indian language text.

For easy viewing on the ipod Touch, I increased the font size of all the text to 16. To generate a PDF I used the free ‘PDFCreator’ software which comes up as a printer in Word. Choosing ‘PDFCreator’ printer gives a PDF document.

With some trial and error I got a good set of page settings (in Word) for good viewing on ipod touch. They are:

· Width 7.5 cm, Height 11.25 cm.

· No header, no footer.

· Margins: Top 0.3, Bottom 0.2, Left 0.33, Right 0.2 (all in cm) (Gutter 0)

The resulting Word -> PDF document fit snugly and displayed beautifully in portrait mode of GoodReader app on the ipod touch. [Note that PDFCreator settings also had no header and no footer]. One page was shown fully and tap on the bottom showed the next page. The text was quite readable. Shifting to Landscape mode made the text size larger and therefore very easy to read but without any horizontal scrolling as the width fit snugly. 2 taps were needed to vertically scroll one page i.e. 2 full pages + fraction of a page. This setting seems perfect and I am very happy with the resultant PDF :-). Pictures are given below.

Did not add page number as GoodReader shows the page number on center tap.

Resizing the PDF seems to be a pretty good solution to the problem. Yes, there is some work involved and if the PDF font is not available on Windows XP, copy-paste into Word will not work. So, it is not really a fool-proof solution for all Sanskrit/Hindi (and perhaps other Indian language) documents but a pretty workable one.

Pics and Docs




Pic on the extreme left shows an ipod Touch with a Sanskrit-English doc which has been ipod Touch/iPhone sized, and pic on left shows the same but as a screenshot. Screenshots are exactly as they appear when viewed on ipod Touch. My camera is not great (neither am I a good photographer :-)) and so the ipod Touch pics do not do justice to how it actually looks.



Left pic shows the above document in Landscape mode. Note how the text size is larger now. But you need to vertically scroll twice to see the full page which is shown fully in Portrait mode above (without any need for vertical scrolling).
------------------------------------------

The two pics below are screenshots of IsaVasya Upanishad in Sanksrit pdf, which has been resized to ipod Touch/iPhone size, and is being displayed using GoodReader in Landscape mode.























Here is the ipod-Touch/iPhone sized Sanskrit Isavasya upanishad used in above pics: http://gabbarsing.freehostia.com/Isavasya-Sanskrit.pdf [Note: If the link does not download the document then try copy-pasting the link in the browser url textbox. I guess the free host site tries to market itself at times.] If I recall correctly I had got the original PDF from IIT Kanpur's scripture site: http://www.vedanta.iitk.ac.in/index.htm The two pics below are of IsaVasya Upanishad in Sanskrit and English pdf, resized, and displayed using GoodReader in Portrait mode with Normal brightness on the left and Easy on Eye (Night reading) on the right.


Note that the extra spaces in Sanskrit words are present in the original document itself, and so they are rendered faithfully by GoodReader.

Here is the resized PDF of Sanskrit-And-English Isavasya upanishad used for above pics: http://gabbarsing.freehostia.com/Isavasya-SanskritNEng.pdf [Note: If the link does not download the document then try copy-pasting the link in the browser url textbox]

This original was from another scripture site (view in IE): http://www.vidyavrikshah.org/

Reading English PDFs/Documents

For English PDFs/documents I recommend conversion of docs to epub (using Calibre) and then viewing them using Stanza on the ipod Touch. You can easily increase the font size (and foreground/background color). Stanza does a superb reflow job (for English text).

The two pics below are of IsaVasya Upanishad in English ebook displayed using Stanza in Normal brightness on the left and Night reading mode on the right. [Note: In the text 2.y should be read as By]



The two pics below are of Genesis (in English) ebook displayed using Stanza in Normal brightness on the left and Night reading mode on the right.



Some more ipod touch photos and corresponding screenshots





Page from Shirdi Sai Baba Amar Chitra Katha picture story




Wordweb English dictionary page for Ecstasy. The ipod Touch is housed in a black leather flip case




ipod Touch Menu. The typical iPhone/ipod Touch pic shows such a menu and so I thought I should add this.

Comments

  1. Great article with good details.
    I will try this with my hindi song book.

    thanks

    ReplyDelete
  2. Good article! You can also use Aji PDF READER on iphone which renders Sanskrit docents beautifully without any modifications - and you can scroll the pages like while on the Stanza application with Aji reader. Aji reader is a free app on iPhone.
    - satya

    ReplyDelete

Post a Comment