Using the Sony Reader PRS500 with the Mac

Sony PRS 500Yesterday, finding myself in Palo Alto, I took advantage of the current UK/US exchange rates to buy myself a new toy in Fry’s.

It’s the Sony PRS – the Portable Reader System – which is a bit like a giant read-only PalmPilot that uses the new e-Paper type display. It’s designed to be a replacement for a paperback – a way of viewing eBooks, and unlike some earlier devices, it’s not limited to DRM-encoded books downloaded from the manufacturer. You can put text files, RTF files, PDF files on it as well, and they look gorgeous.

However, there was a big question-mark over my purchase, which was that there is no official Mac or Linux support for this device. You can use a card reader to plug an SD card into your Mac, copy the files onto it and then plug it into the PRS, but that’s hardly convenient, especially in comparison to the (optional) USB docking station. Sadly, the PRS doesn’t just appear as a USB storage device. You can run the Sony software just fine under Windows using Parallels, but that’s yucky too.

Fortunately, Kovid Goyal came to my rescue with a system called librs500. He’s reverse-engineered the Sony protocols and created a Python-based library and utilities that can transfer files to and from the PRS. Sony owe him some money – the profit from my purchase, at the very least! You need to install a few bits, like Python 2.5, to use libprs500 – the easiest way is probably to use MacPorts. Once you’ve got libprs500 installed, though, you can start to do fun things.

Printing to the PRS

I wanted a way to take an arbitrary document on my Mac and make it available as a PDF on my PRS. Here, in a nutshell, is how to do it:

  • Go into File > Page Setup, pull down the ‘Paper size’ option and create a custom page size that you’ll use, where possible, for printing to the PRS. I called mine ‘Sony Reader’, and it’s 9.06 x 12.24cm, with small margins (0.3cm, in my case). When you want to output something for the PRS, it will usually look best if you set this small page size first.
  • We’ll use the Mac’s PDF Services facility, which lets you print to a PDF and send it to a particular location or program directly from the Print dialog. I created a wrapper script called book2prs which will be given the resulting PDF and will send it to the PRS using Kovid’s prs500 utility. You need to put the script in your ~/Library/PDF Services folder (create it if you haven’t got one). Or, like me, you can put it somewhere else and put an alias in the PDF Services folder which has a nice name. I called mine ‘To Sony Reader’.
  • Once this is all in place, you can plug the PRS into your USB port, pick your custom page size for your document and then go File>Print>PDF>To Sony Reader. All being well, when you unplug your PRS, it will have a new document on it! If something goes wrong – if you forget to plug in the PRS, for example – you won’t get any feedback to that effect, but the script does create a log at /tmp/book2prs.log which might be helpful. Any other error messages will be visible using the Console app. Lots of room for improvement here!
  • If you want to print stuff from Safari, it’s a good idea to customise the toolbar and add the little ‘AA‘buttons which let you change font size. In the absence of other info Safari will use the on-screen font size as a guideline for the font to use for printing, and you want slightly larger than normal for the PRS. I also found the output was much nicer if I set Safari to use a sans-serif font as the default. Again , this may be overwritten by CSS for a specific site, but it’s a useful default.
  • My version of the script will name the file on the PRS based on the title as seen by the print system. So you may need to modify it if, for example, you want to print different pages from the same web site and they all have the same page title. The later ones will overwrite the earlier ones at present.

There you are! Now you too can read Status-Q on a Sony Reader!

Status-Q on a Sony PRS

Enjoyed this post? Why not sign up to receive Status-Q in your inbox?

14 Comments

I think it’s time for you to visit and show off your toy! 😉

so (except for the screeen) its less advanced that the Apple Newton PDA, last made 10 years ago!.

Give me 300-400 of these ‘epaper’ screens as pages in a unit, (called a book) a USB connection (wireless would reuire batteries), no refreshing then, upload a book, it stays there, change book on next connection, (and no damn batteries) and I’ll get one

I hear phillips is working on one like this, due in two years (maybe)

PDF on the Sony Reader is usable, but a bit cumbersome and slow relative to .rtf which refreshes quite quickly.

(The processor inside the PRS-500 is quite a slow one when it comes to running the PDF renderer.)

For a mainly text document such as a novel, I’ve found opening the PDF in Preview, selecting all, doing a cut & paste into TextEdit, performing some minor cleanup, then saving as RTF works well.

Given that the e-ink refresh time is annoyingly slow at the best of times, having to wait an extra fews seconds per page for a PDF to render is a bit too much for me to bear when trying to read a book.

Excelient post, I spent a bit of a morning trying to get Kovid Goyal’s libprs500 to work on my intel Mac Mini though I found his documentation great, its pretty sparse in areas. I keep getting an error when trying to run the prs500-gui from terminal any suggestions>

Getting the GUI to run will require PyQT4, which means QT4, and I suspect you’ll have to compile both yourself since they’re not in MacPorts yet. And then you’d need to run it under X11. I haven’t tried it yet…

The link to your book2prs script isn’t working at the moment, do you mind updating the link? I’m interested in taking a look at a script that goes into the pdf services menu…..I think it’ll be rather handy in getting NetNewsWire output into the PRS-500.

Thanks!

Sorry, adin – link now fixed!

Thanks for fixing it.

I’m shocked tho–I didn’t know that the PDF Services could directly take a python script–I don’t need an applescript/automater wrapper?

Yay for being able to run *nix shellscripts directly then!

Someone named Chris mailed me to ask a bit more about what he needed to do to get this working. Here’s a bit more info…

MacPorts is a package-management system that makes it easy to install other packages.

It’s a while since I installed most of the stuff on mine, so I forget how many packages were needed, but if you install MacPorts as described at

http://trac.macosforge.org/projects/macports/wiki/InstallingMacPorts

and then install Python 2.5 using, I think,

sudo port install python25 libusb py-setuptools

it will probably get most of what you need.

Then you should be able to follow the ‘Installing the package’ instructions at
https://libprs500.kovidgoyal.net/

Hope that helps a bit.

I think the problem with that sequence of events is that MacPorts doesn’t seem to have a 2.5 or 3.0-compatible version of setuptools; it installs only the 2.4 version when you try to install py-setuptools, which doesn’t work when installing libprs500. Any thoughts?

Mmm. OK – I must already have installed it when I started! Sorry; it’s hard for me to test all the steps needed without wiping my machine!

Once you have Python 2.5 installed, you can find the installation instructions for setuptools here. Essentially, if you download setuptools-0.6c5-py2.5.egg, or whatever 2.5 version is current, and make sure /opt/local/bin/python2.5 is on your path, you should be able to do

sudo sh setuptools-0.6c5-py2.5.egg

to install it.

I just got a discount prs500 and had relatively good luck on the mac (tiger) with the combination of
– libprs500
– pdflrfwin.exe version 0.99

libprs500 did _not_ require installing python 2.5, however I had already installed python 2.4 via macports.

pdflrf works very nicely, for technical (math) documents even. I run the windows version under crossover6.2,
then download the resulting .lrf to the device using libprs500. This works for .djvu, and even for .pdf the
results are generally better than looking at the original .pdf, because pdflrf crops and zooms the material
intelligently to make best use of the few pixels.

To run pdflrf, Crossover -> Run program -> Open shell,
then type “wine pdflrfwin.exe” and it brings up the gui.
(Possibly there is an easier way, I don’t really understand crossover).

That said…
while I’m happy to be able to possibly use this device
(my initial attempt at reading a technical pdf made me almost give up),
the process could be smoother. Something (I suppect crossover)
was using Tons of memory, and the system fan goes crazy.
Also a bunch of disk disappeared…maybe just vm.

I ran pdflrfwin under a separate guest account since I don’t trust
closed-source windows executables written by random guys on the web
as a matter of principle, however this particular execuable is obviously
quite well engineered.

[…] Bah! Quentin has a new toy. It’s the Sony PRS – the Portable Reader System – which is a bit like a giant read-only PalmPilot that uses the new e-Paper type display. It’s designed to be a replacement for a paperback – a way of viewing eBooks, and unlike some earlier devices, it’s not limited to DRM-encoded books downloaded from the manufacturer. You can put text files, RTF files, PDF files on it as well, and they look gorgeous. […]

Got Something To Say:

Your email address will not be published. Required fields are marked *

To create code blocks or other preformatted text, indent by four spaces:

    This will be displayed in a monospaced font. The first four 
    spaces will be stripped off, but all other whitespace
    will be preserved.
    
    Markdown is turned off in code blocks:
     [This is not a link](http://example.com)

To create not a block, but an inline code span, use backticks:

Here is some inline `code`.

For more help see http://daringfireball.net/projects/markdown/syntax

*

© Copyright Quentin Stafford-Fraser