View Single Post
Old 01-21-2013, 10:16 PM   #312
willus
Fuzzball, the purple cat
willus ought to be getting tired of karma fortunes by now.willus ought to be getting tired of karma fortunes by now.willus ought to be getting tired of karma fortunes by now.willus ought to be getting tired of karma fortunes by now.willus ought to be getting tired of karma fortunes by now.willus ought to be getting tired of karma fortunes by now.willus ought to be getting tired of karma fortunes by now.willus ought to be getting tired of karma fortunes by now.willus ought to be getting tired of karma fortunes by now.willus ought to be getting tired of karma fortunes by now.willus ought to be getting tired of karma fortunes by now.
 
willus's Avatar
 
Posts: 526
Karma: 2526455
Join Date: Jun 2011
Location: California
Device: Kindle 2, iPad
Quote:
Originally Posted by anime513 View Post
Thank you for taking the time to help me. In general, I've been using -n -m 0 -col 1 for my conversions....
Try using -mode fw (fit width):

k2pdfopt -mode fw japanese.pdf

You can see what the -mode option does on my usage page, or take a look at the native output help page. If you don't want the output rotated, add -ls-. The -vb option (which is applied by -mode fw), when supplied with a negative value, keeps the scaling more uniform. [Yet another option is to set -odpi to a lower value so that k2pdfopt doesn't over-magnify certain regions.] For documents like you're reading--single column with lots of special spacings, figures, and indentation, the -mode fw option is best if it produces output large enough to read on your e-reader. If you need higher magnification than -mode fw, then you should try the default conversion (no arguments), which will allow text wrapping, but you'll probably get some occasional strange formatting, particularly on the Chem book which has stuff in the margins--that's something k2pdfopt doesn't handle well.

For the C++ doc, set the white threshold to a high value so that anything that isn't perfectly white is considered "not white":

-wt 250

That will do much better at keeping k2pdfopt from splitting up the figures, which have a lot of light grey backgrounds that k2pdfopt thinks are white space by default.

Here is a better description of how -vb works--a description which I'll put into the next release:

-vb <thresh> Set gap-size vertical-break threshold between regions that cause them to be treated as separate regions. E.g. -vb 2 will break the document into separate regions anywhere there is a vertical gap that exceeds 2 times the median gap between lines of text. These separate regions may then be scaled and aligned independently. Special values: Use -vb -1 to preserve all horizontal alignment and scaling across entire regions (vertical spacing may still be adjusted). Use -vb -2 to exactly preserve each region (both horizontal alignment and vertical spacing--this is the value used by -mode fw, for example). The default is -vb 1.75.

willus is offline   Reply With Quote