Register Guidelines E-Books Search Today's Posts Mark Forums Read

Go Back   MobileRead Forums > E-Book Readers > Sony Reader

Notices

Reply
 
Thread Tools Search this Thread
Old 07-31-2009, 02:16 PM   #1
trustin
Junior Member
trustin began at the beginning.
 
Posts: 2
Karma: 10
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.

Highlights:

* 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

Samples:

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):

Code:
pdftoppm -r 300 mybook.pdf img
2) Run img2pdf against the populated images. Please note that img2pdf requires Java 6 or later.

Code:
java -jar img2pdf.jar img-*.ppm
3) img2pdf will generate 'out.pdf' - rename it, copy it to your memory stick, and enjoy.

Notes:

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.
Attached Files
File Type: zip img2pdf-dist.zip (2.22 MB, 183 views)
File Type: pdf Access.pdf (2.22 MB, 226 views)
File Type: pdf Generics.pdf (2.56 MB, 199 views)
File Type: pdf Generics_out.pdf (1.89 MB, 151 views)
File Type: pdf Access_out.pdf (1.38 MB, 173 views)
File Type: pdf Grails.pdf (1.96 MB, 290 views)
File Type: pdf Grails_out.pdf (3.82 MB, 174 views)

Last edited by trustin; 07-31-2009 at 02:37 PM.
trustin is offline   Reply With Quote
Old 07-31-2011, 01:01 AM   #2
jbaruch
Junior Member
jbaruch began at the beginning.
 
Posts: 2
Karma: 10
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.
jbaruch is offline   Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Sony PRS-505 battery replacement AlexM Which one should I buy? 50 05-28-2010 11:28 PM
Amazon Kindle/Sony PRS-700/Sony PRS-505 Comparison Photos chrissy Which one should I buy? 18 05-06-2009 12:25 PM
Poll: Sony Reader PRS-505 upgrade to Sony PRS-700 Kris777 Sony Reader 70 02-18-2009 06:34 PM
Just saw Sony PRS 700 and PRS 505 at Sony Style Store gamegirl Sony Reader 14 12-15-2008 04:16 PM
Sony Reader PRS-505 upgrade to Sony PRS-700 Kris777 Sony Reader 23 12-08-2008 06:56 AM


All times are GMT -4. The time now is 04:43 PM.


MobileRead.com is a privately owned, operated and funded community.