KoffeeKoder


  • My Weekend Adventure with Sony Book Reader PRS-505
    published on 6/23/2008 12:30:23 PM
  • I was always interested in reading e-books but never liked the idea of reading off the screen. It puts too much strain on the eyes and the idea never offered a portable solution.

    Recently, my colleague bought a Sony Book Reader PRS-505. I played around with it for few minutes and really enjoyed it. Then two days ago I bought one myself. I was very excited since now I can transfer all my 50+ PDF books into this reader. The transfer went fine but the darn font was so small that you need a magnifying glass to read it. One technique that I used to make the font larger was to press the “+” key for 5 seconds and the reader changes the orientation from the A4-A6 size mode to a landscape mode. The landscape mode was much better and the font size was little bigger. But, the idea of reading a book in horizontal mode was very lame and reading a book did not felt natural also I needed a little bit bigger font size.

    I quickly thought why not use ITextSharp library to read the existing PDF and change the size of the font and then save the PDF again. My first attempt was to copy the text from the PDF book and paste it into a notepad file (Yeah I will loose all the images and good stuff but anyway). This was just a test that if I can increase the font and read it correctly on the device.

    Here is the code:



      string path = @"C:\Book.txt";
                string destinationFileName = @"C:\Book.pdf";

                string text = File.ReadAllText(path);

                Document document = new Document(PageSize.A4);
                PdfWriter writer = PdfWriter.GetInstance(document, new FileStream(destinationFileName, FileMode.Create));

                document.Open();
                document.Add(new Paragraph(text, new Font() { Size = 16 }));
                document.Close();
                writer.Close();

        

    The above code did make the font size larger and it was readable on the device. The problem was that all the formatting, images and good stuff got lost during the transformation.

    My second attempt was to alter the existing PDF document. Unfortunately, the library does not allow altering the original document.  The only way was to export the page as an image and scale the image to a larger size.

    The code for that approach is shown below:



      string path = @"C:\book.pdf";
                string destinationFileName = @"C:\myfile.pdf";


                PdfReader reader = new PdfReader(path);
                int n = reader.NumberOfPages;
                Document document = new Document(PageSize.A4);

                PdfWriter writer = PdfWriter.GetInstance(document, new FileStream(destinationFileName, FileMode.Create));

                int i = 0;
                document.Open();

                PdfContentByte cb = writer.DirectContent;
                
                 PdfTemplate template = cb.CreateTemplate(0,0);
                     

                while (i < n)
                {
                    document.NewPage();
                    i++;
                    
                    PdfImportedPage importedPage = writer.GetImportedPage(reader, i);
                    Image img = Image.GetInstance(importedPage);
                    img.ScalePercent(200);
                    document.Add(img);
                    cb.AddTemplate(importedPage, 0, 100);
                }


                document.Close();
                writer.Close();            



    This did scale the image and made everything look bigger but now the scaled image won’t fit properly on the Sony Book Reader screen. It was cutting up from the sides. My feeble attempts were total waste but I did have fun using IText library :).

    Anyway, I decided to look on the web for a better solution. To my luck I found Calibre. Calibre was a life saver since it allows you to change the font size and do all sort of stuff with your existing PDF files. It also allows you to read RSS feeds and sync it with your reader. The interface is also very simple and clean. It only took me few minutes to import books and RSS feeds to my Sony Reader and the display was awesome. The font size was great and I was also able to jump within a PDF file using embedded links. So, if you are using a Sony Reader or willing to buy one then Calibre is the best software available and it is FREE.

    Now, let’s talk a little bit about the device itself. The device is small but you cannot put it in your pants pocket. The display dimension is 6” and the weight is about 9 ounces (without the cover). There are many buttons on the device going from 0 to 9. You can use those buttons to select different options. You can turn the page by using the small buttons on the right side of the device or using the book buttons on the bottom of the device. The display is awesome. It feels that you are reading a book. It does not strain your eyes and you can go on for hours. The batter life is awesome too. The battery is only consumed when you turn the page. On the Sony’s website they claim that from one full re-charge you can turn 7500 pages now that’s a lot.

    Reading RSS feeds is also very simple. You just download Calibre and add the RSS feeds that you would to read and then sync your device with the feeds. It will download all the feeds to your device. Calibre allows you to customize what you want for the RSS feeds. This means you can get the title, description and also comments. Please note that there are some RSS feeds that will only pull down the abstract of the post. This means that you won’t be able to read the complete post using the device. I think you can tinker with the Calibre RSS Feeds settings known as Recipe to get the complete post.

    The final thing I like to discuss is the price of Sony Reader. It cost $300 the cover is also included. I know it is a bit pricy but if you have tons of PDF books that are just waiting to be read then I think the price is pretty decent. Oh yeah did I mention you can also listen to music and view pictures on the device. Off course the pictures will be displayed in black and white and so does your PDF document (No color sorry people everything is in black and white).

    UPDATE:

    Today, I tried to load up an Arabic document and it did not worked out. All the characters were displayed as strange dancing symbols. The other thing I found is that you can jump forward to a link (reference link) but then you cannot come back to the original page. This is kinda annoying but I don't really use that feature. The total capacity is about 210-220 MB but if you need more then you can always plug in the memory slots.

    If you want to convert a URL or TEXT to PDF then you can use the following online tool:

    www.Pdfonfly.com




  • by nava on 6/25/2008 1:58:20 AM
  • Good article.
    Thanks for sharing the idea on a Book Reader with us.
  • by eknowledger on 7/4/2008 9:49:12 AM
  • Hello Mohammed,

    thanks for the detailed article about the reader, in fact i was gona buy one soon but there was something i wanted to make sure it supports, it's about the arabic books i was sure that this technology will not support arabic charachters but what about Scanned Arabic PDF books (scanned as images) - you can find alot of those on this url:http://www.al-mostafa.com

    i have tons of those books and i wanted to know if the reader will support reading those books? and how will be reading those scanned books on the reader? will reading be easy? can i zoom to see the text clearly?

    i'll be very greatfull if u try to download one of those arabic scanned pdf books on the device and feed me back with the results .

    thanks alot bro,
    Ahmed
    http://eknowledger.spaces.live.com
  • by Mohammad Azam on 7/5/2008 11:41:23 AM
  • I tried to save the Arabic document from your site but it does not make is readable. Although, I can see the Arabic text but it is very small. I tried using Calibre but still it makes no difference. I will try to download Arabic PDF from somewhere else and also try to save it in the device. Let's see what is the result of that.
  • by Won't recommend Calibre on 7/5/2008 10:26:03 PM
  • I tried the calibre tonight and the software did a poor good job on converting pdf format to the LRF format.
    The problem is that the page size in a PDF file has to be 90mm x 122mm so that pages can fit in the reader for human to read the text comfortably.
    I will try using adobe Acrobat to adjust the page size when I got time.
    Sony’s unofficial SDK can be found on line: http://www.mobileread.com/forums/showthread.php?t=11280

    Jin
Recommended Books