View Single Post
Old 01-30-2019, 11:49 AM   #1675
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: 1,303
Karma: 11087488
Join Date: Jun 2011
Location: California
Device: iPad
Quote:
Originally Posted by Loyd View Post
I compiled the latest version of k2pdfopt (v2.51a) after your message. My precedent results have been obtained with v2.42.

Since I am using the mac version of k2pdfopt I need to ask what is the equivalent of "Fixed output font size" box in the command line ?

Based on your suggestion, here is what I use currently :

-gs -gtr 0.18 -col 1 -mag 1.65 -dr 2.75 -idpi 600 -vls 1.6 kp3 -x

Maybe some commands are not necessary…

My purpose is to get closer to what I have when reading an AZW3 (see attached Kindle' screenshots), and it is almost achieved. Thank you.

What I try to get right now is :

if it is possible :

1. Get the text adjusted (no space in the end of lines). Just like AZW3.

2. Specify the same font in the output file that I use when reading under Kindle PW3 (I am using a personalized one called CharInk).

3. Overcome the artefact encountered on page 16, line 5 (see pdf attached).

Great thanks in advance for your time.
You should not have had to compile 2.51 yourself--there is an OSX binary download on my site. The command-line font size option is -fs, e.g. -fs 12 for 12-point font.

You don't need the -gs option unless you did not compile with MuPDF and are thus forced to use ghostscript. The Mac OSX binaries from my site are compiled with the MuPDF library.

To fully justify the text (no spaces at the end of lines in the converted file) use: -j 0+

To eliminate the artifact on p. 16, remove your -gtr option. It's too high and causing overly aggressive line cutting. The default works fine for your document since there is already plenty of gap between the lines in the source file. You should only need to increase -gtr when the lines in the source file are so close to each other that they slightly overlap in places.

There is no way to change the font with k2pdfopt. That's not part of its functionality. To do that you need to fully convert the PDF to a different type, such as mobi, which often requires a lot of manual editing, or you need the source document that created the PDF.

Also, I think you're over-killing the -dr option. You shouldn't need nearly 3x the resolution of your reading device. All that does is to make the conversion unnecessarily slow and the output file unnecessarily large (in bytes).

So my final recommendation is:
k2pdfopt -dev kp3 -j 0+ -col 1 -mag 1.2 -dr 2 -vls 1.6 -x m.pdf

Converted file attached.
Attached Files
File Type: pdf m_k2opt.pdf (4.12 MB, 771 views)
willus is offline   Reply With Quote