Converting PDF to the LRF using a rasterfarian/msh_lrsparser combo

June 24, 2007

Filed under: Sony Reader PRS500 — peter @ 10:42 am

As written in our previous post, PDF aren’t displayed very well off-the-shelf on the Sony Reader PRS500. I think the same problems would occur to the direct competition of Sony, Irex Iliad.

Luckily for us, there is a tool called RasterFarian which will use several programs to make images out of PDF-files, enhance it and in short, rasterize it for optimal display on the Sony Reader and Iliad. In the final steps, it will create a LRS-fileformat, which in turn gets converted into the BBeB/LRF-fileformat used by Sony Reader.

This is done with the free tool lrs2lrf.exe, a japanese tool made for the predecessor of the PRS500, the Librie. This tool, unfortunately, is very very slow. Especially for larger files (500 pages or higher) the processing time will grow exponantially. For a PDF of 4000 pages, it will take about 8 hours.

If you’re in a hurry, you can do the final conversion step with an improved LRS2LRF parser called MSH_LRSPARSER. This tool is at least a factor 50 faster than lrs2lrf.exe.  You’d need to do some extra work though, as the LRS-format produced by RasterFarian can’t be used directly on the MSH_LRSparser. With the help of the creator of MSH_LRSparser, I’ve used the following steps to make the LRS-format suitable.

  1. In the working directory of RasterFarian (C:\Program Files\RasterFarian\temp) you’ll find a temp.lrs and a result-directory, copy the result-directory to another place (for example: C:\result).
  2. Copy the temp.lrs to that directory (C:\result) which contains all the images.
  3. Open the temp.lrs in a good texteditor which allows you to save the file as UTF (for example ultraedit, but notepad should be able to do it too)
  4. In the temp.lrs search for the text blockrule=”horz.adjustable” and replace it with blockrule=”horz-adjustable”
  5. (Optional) You can edit the TOC if you like
  6. Remove all the paths to the images. IE instead of this C:\Program Files\RasterFarian\\temp\result\0001 make it look like this 0001
  7. Go to the end of the file and remove all the linebreaks, tabs after the tag: </BBeBXylog> (the > has to be the last character of the file)
  8. Finally, save the temp.lrs as UTF-16 format

After these steps, the lrs-file is good to be used. Go to the directory (C:\result) and run MSH_LRSPARSER like this <pathtoprogram>MSH_LRSPARSER.exe temp.lrs book.lrf

Note: MSH_LRSPARSER does not write metadata like the title or author, so may want to give your LRF-file an appropiate name.

1 Comment »

  1. [...] into PDF-files. Although I can use the PDF directly in the reader, I still run the PDF through a rasterfarian, this makes the manga even more readable and easy to navigate. I’ll write a tutorial for this [...]

    Pingback by Hightech @ AFmag.net » Reading manga and comics on the sony reader. The definitive review. — June 24, 2007 @ 2:10 pm

RSS feed for comments on this post. TrackBack URL

Leave a comment