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

Go Back   MobileRead Forums > E-Book Formats > PDF

Notices

Reply
 
Thread Tools Search this Thread
Old 04-03-2011, 05:07 AM   #1
baliantas
Junior Member
baliantas began at the beginning.
 
baliantas's Avatar
 
Posts: 9
Karma: 10
Join Date: Feb 2011
Device: Sony PRS-350
Image Magick equivalent for pdflrf

Hello,

My first post here. Hope I'm doing everything "according to the book"!

I've been using pdflrf for a while now, and although the results are not bad at all, I feel I need to have some more control. I'm hoping I can use Image Magick to do what pdflrf does, with the added advantage that I can adjust settings more easily.

Specifically, I want to be able to:
- review/modify the generated png files before compiling them into an ebook
- convert to epub instead of lrf

My workflow would be something like this:
- convert the pdf file to png
- get rid of the white margins (Image Magick does a wonderful job here)
- rotate 90° and resize the height so it's equal to the width of my ereader screen (Sony PRS-350)
- make chunks with dimensions that fit my ereader
- if text lines are broken, find a line that's completely white and split there instead (cf. "smart cut" in pdflrf)
- thicken the edges, to increase readability
- join pages (so I don't have pages with just a couple of lines on them, cf. pdflrf)
- compile to epub

This would be (mostly) the same workflow as in pdflrf...


Can this be done with Image Magick? (or another tool, perhaps)

Thanks,
Baliantas

Last edited by baliantas; 04-03-2011 at 05:23 AM. Reason: Title update
baliantas is offline   Reply With Quote
Old 04-03-2011, 05:29 AM   #2
DSpider
Evangelist
DSpider ought to be getting tired of karma fortunes by now.DSpider ought to be getting tired of karma fortunes by now.DSpider ought to be getting tired of karma fortunes by now.DSpider ought to be getting tired of karma fortunes by now.DSpider ought to be getting tired of karma fortunes by now.DSpider ought to be getting tired of karma fortunes by now.DSpider ought to be getting tired of karma fortunes by now.DSpider ought to be getting tired of karma fortunes by now.DSpider ought to be getting tired of karma fortunes by now.DSpider ought to be getting tired of karma fortunes by now.DSpider ought to be getting tired of karma fortunes by now.
 
DSpider's Avatar
 
Posts: 450
Karma: 343115
Join Date: Nov 2009
Location: Romania
Device: PW2 2014
Yes, Scan Tailor: http://scantailor.sourceforge.net

To edit PNG images you can use GIMP: http://www.gimp.org


They are both very powerful open source tools.


Edit: Scan Tailor outputs .tif images, but it's all the same (lossless just like PNG). If you're keen on PNG you could do a batch conversion using IrfanView or similar. But honestly, PNG/TIFF, it's all the same to me - though it may not be the all the same with the e-reader, so you need to experiment.

AFAIK, ePUB splits graphics automatically. So you could, perhaps, set the top margin in Scan Tailor at 1 (maybe except for the chapter headings) for the pages to transition more smoothly. Then you would basically have an ePUB full of graphics, specifically "tailored" for the PRS-350, which I believe is what you're trying to accomplish. But you won't be able to search or highlight, they're images. Then again, same with a book borrowed from a library... You may be onto something.

Last edited by DSpider; 04-03-2011 at 05:44 AM.
DSpider is offline   Reply With Quote
Advert
Old 04-03-2011, 05:47 AM   #3
baliantas
Junior Member
baliantas began at the beginning.
 
baliantas's Avatar
 
Posts: 9
Karma: 10
Join Date: Feb 2011
Device: Sony PRS-350
Quote:
Originally Posted by DSpider View Post
Yes, Scan Tailor: http://scantailor.sourceforge.net

To edit PNG images you can use GIMP: http://www.gimp.org
They are both very powerful open source tools.
Scan Taylor does everything I want, EXCEPT:

- resize the height so it's equal to the width of my ereader screen (Sony PRS-350) --> so the images should be split into 800x600 pixels chunks
- equivalent for "smart cut" in pdflrf
- join pages (so I don't have pages with just a couple of lines on them, cf. pdflrf)

The Gimp is a wonderful piece of software, but I'm not willing to manually edit hundreds of images...

Thanks for the quick reply!
B.
baliantas is offline   Reply With Quote
Old 04-05-2011, 04:11 AM   #4
eksor
Connoisseur
eksor ought to be getting tired of karma fortunes by now.eksor ought to be getting tired of karma fortunes by now.eksor ought to be getting tired of karma fortunes by now.eksor ought to be getting tired of karma fortunes by now.eksor ought to be getting tired of karma fortunes by now.eksor ought to be getting tired of karma fortunes by now.eksor ought to be getting tired of karma fortunes by now.eksor ought to be getting tired of karma fortunes by now.eksor ought to be getting tired of karma fortunes by now.eksor ought to be getting tired of karma fortunes by now.eksor ought to be getting tired of karma fortunes by now.
 
eksor's Avatar
 
Posts: 94
Karma: 999884
Join Date: Jun 2009
Device: prs700, i-mate JAMin, smartq v7, GeeksPhone Zero, iPad 3rd Gen
Quote:
Originally Posted by baliantas View Post
Hello,

My first post here. Hope I'm doing everything "according to the book"!

I've been using pdflrf for a while now, and although the results are not bad at all, I feel I need to have some more control. I'm hoping I can use Image Magick to do what pdflrf does, with the added advantage that I can adjust settings more easily.

Specifically, I want to be able to:
- review/modify the generated png files before compiling them into an ebook
- convert to epub instead of lrf

My workflow would be something like this:
- convert the pdf file to png
- get rid of the white margins (Image Magick does a wonderful job here)
- rotate 90° and resize the height so it's equal to the width of my ereader screen (Sony PRS-350)
- make chunks with dimensions that fit my ereader
- if text lines are broken, find a line that's completely white and split there instead (cf. "smart cut" in pdflrf)
- thicken the edges, to increase readability
- join pages (so I don't have pages with just a couple of lines on them, cf. pdflrf)
- compile to epub

This would be (mostly) the same workflow as in pdflrf...


Can this be done with Image Magick? (or another tool, perhaps)

Thanks,
Baliantas
Hi:

Try gscan2pdf (gscan2pdf.sourceforge.net), splits, joins, crops and rotates. Also, interfaces with unpaper (http://unpaper.berlios.de/) for blacl areas removal and deskewing.

Regards
eksor is offline   Reply With Quote
Reply

Tags
conversion, image magick, pdf, pdflrf

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Netflix equivalent? csudell Deals and Resources (No Self-Promotion or Affiliate Links) 18 05-06-2010 09:18 PM
PDFLRF Help Bilbo1967 Workshop 1 09-13-2009 03:26 PM
Rasterfarian, pdfread and pdflrf. A comparison athlonkmf Sony Reader 14 02-11-2009 02:21 AM
pdflrf: Possible non-compliance of GPL terms ashkulz Feedback 2 09-05-2008 12:05 AM


All times are GMT -4. The time now is 12:14 PM.


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