Written by: NetworkError, on 08-08-2008 17:29
Last update: 03-04-2009 13:43
Published in: Public,
Technical Wootness
Views: 463
My latest project is reading books on my new Blackberry 8330. They're in PDF format and they seem to be a bit much for the poor, stupid Blackberry PDF distiller. I tried converting the whole file to HTML with a command line utility called pdftoheml, but that was a bit large as well.
So I had to come up with a way to read a PDF file one piece at a time. I figured the path-of-least resistance would be to create a web-based pdf-to-html converter that did its work one page at a time.
That brings us to today's project. I created a class (and controller) that wraps the Linux command line utility "pdftohtml". The controller tells the class what "book" (PDF file) to read and which page to read. The class then outputs the HTML for that page. The HTML is mostly generated from "pdftohtml", but I'm going back through the output and re-writing parts of it. I'm also adding pagination, a book selector page, and I'm saving the reader's place in a few cookies.