View Single Post
Old 10-20-2010, 09:51 AM   #26
frabjous
Wizard
frabjous can solve quadratic equations while standing on his or her head reciting poetry in iambic pentameterfrabjous can solve quadratic equations while standing on his or her head reciting poetry in iambic pentameterfrabjous can solve quadratic equations while standing on his or her head reciting poetry in iambic pentameterfrabjous can solve quadratic equations while standing on his or her head reciting poetry in iambic pentameterfrabjous can solve quadratic equations while standing on his or her head reciting poetry in iambic pentameterfrabjous can solve quadratic equations while standing on his or her head reciting poetry in iambic pentameterfrabjous can solve quadratic equations while standing on his or her head reciting poetry in iambic pentameterfrabjous can solve quadratic equations while standing on his or her head reciting poetry in iambic pentameterfrabjous can solve quadratic equations while standing on his or her head reciting poetry in iambic pentameterfrabjous can solve quadratic equations while standing on his or her head reciting poetry in iambic pentameterfrabjous can solve quadratic equations while standing on his or her head reciting poetry in iambic pentameter
 
frabjous's Avatar
 
Posts: 1,213
Karma: 12890
Join Date: Feb 2009
Location: Amherst, Massachusetts, USA
Device: Sony PRS-505
It occurred to that one way to get what you want (or what I think you want) is to simply burst the PDF into separate pages, in effect run the old script on each page, and them reassemble them, and so making the changes to the script are actually fairly simple.

So here's a new script you can try if you want.

I also made some other minor changes, mainly suppressing some of the terminal noise ghostscript makes (--which may end up suppressing error messages, but I'm not sure they'd be meaningful to you anyway--), and forcing each page into the exact Kindle page size. (Well, 3.54 × 4.72 inches, which is 90x120 rounded off the nearest 100th of an inch.)

One disadvantage, in addition to some strangely skewed pages, is that the script is a lot slower. I already thought the script was slow compared to BRISS, and compared to sopdf, it's a dead snail. This is in part because it does each page separately, and also in part because of the variation in stretching, it takes it longer to figure out how to crop the page.

I've giving this script a different name, and posting it separately, rather than replacing the one above, since some people might prefer to use the one above instead. They both have their advantages, I suppose.

This one is called pdf3to4.sh (to mark that all pages have a 3:4 ratio). The instructions for using it are the same. Download the tarball, extract the file pdf3to4.sh, and then:
Code:
cd "/path/where/you/saved/it"
chmod a+x pdf3to4.sh
./pdf3to4.sh "example.pdf"
You only need to do the middle thing the first time you use it.
Attached Files
File Type: gz pdf3to4.tar.gz (1.8 KB, 248 views)

Last edited by frabjous; 10-20-2010 at 06:26 PM.
frabjous is offline   Reply With Quote