|07-31-2009, 03:16 PM||#1|
Join Date: Jul 2009
Device: Sony Reader PRS-700BC
img2pdf - my personal pdflrf replacement for Sony PRS-700
I recently purchased PRS-700BC and I'm very happy with it. The only problem was that I could not find a good alternative to pdflrf. Hence I wrote one by myself and it seems to work pretty well for my e-book collection (mostly computer books) at least, and I thought it might be a good idea to share my work with you.
* Smarter cropping algorithm that works better with mixed left/right margins and horizontal line separators
* High quality scaling and grayscale conversion
* Removes too tall blanks in a page which is often unnecessary for reading
* Darkens the text more beautifully so that it's easier to read in e-ink
I downloaded a couple free chapters from some publishers and ran img2pdf against them with the default parameters. See the attached PDF files. The result could be better if some parameters are modified, but it works for me.
How to use:
1) Populate a series of images from a PDF file using an existing tool such as pdftoppm. For example, the following command generates the image files whose name starts with 'img-' appended by the page number (e.g. img-001.ppm):
pdftoppm -r 300 mybook.pdf img
java -jar img2pdf.jar img-*.ppm
I developed this application for my own personal purpose. I'm sharing this in the hope that someone will take it and make it more generic and user friendly for those who are not familiar with configuring and running this application. Therefore, even if you ask for improvement or bug fix, I will not pay close attention to such requests as long as img2pdf processes my e-books just fine. Please feel free to fork it. It's fine as long as you keep the original license clauses in the source code.
There are a couple low-hanging fruits for improvements:
* Output format could be LRF rather than PDF. I just don't know how to write an LRF file.
* Command line options could be added. There are many configurable parameters in the source code - I just did not provide proper interface because I'm just fine with modifying the source code to adjust the parameters. Please contact me if you have questions about the parameters in ImageProducer.java, but I'd recommend you to review the source code first.
Last edited by trustin; 07-31-2009 at 03:37 PM.
|07-31-2011, 02:01 AM||#2|
Join Date: Jul 2011
Device: Sony PRS-950
Thanks, trustin! I was looking for something open-sourced and in Java in order to be able to tweak it.
|Thread Tools||Search this Thread|
|Thread||Thread Starter||Forum||Replies||Last Post|
|Sony PRS-505 battery replacement||AlexM||Which one should I buy?||50||05-29-2010 12:28 AM|
|Amazon Kindle/Sony PRS-700/Sony PRS-505 Comparison Photos||chrissy||Which one should I buy?||18||05-06-2009 01:25 PM|
|Poll: Sony Reader PRS-505 upgrade to Sony PRS-700||Kris777||Sony Reader||70||02-18-2009 07:34 PM|
|Just saw Sony PRS 700 and PRS 505 at Sony Style Store||gamegirl||Sony Reader||14||12-15-2008 05:16 PM|
|Sony Reader PRS-505 upgrade to Sony PRS-700||Kris777||Sony Reader||23||12-08-2008 07:56 AM|