View Single Post
Old 12-16-2017, 11:28 PM   #1494
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,299
Karma: 11087488
Join Date: Jun 2011
Location: California
Device: iPad
Quote:
Originally Posted by Steven630 View Post
Thank you for your great tool. This is the best software I've ever used for PDF optimization.

While converting a Chinese document, I have found some unnecessary line breaks. I use the v2.42 on Windows and "smart line breaks" is unchecked for this conversion (when checked, more unnecessary line breaks appear).

Command line: -dev kp2 -fs 16.5 -col 1 -ws -0
Additional Options: -bp[-] -om 0.2 -y
...
1. The unnecessary line break you point out has nothing to do with the spacing between Chinese characters. It occurs because the one line, due to the punctuation mark, is not fully justified (see attachment, green circle). Because the rest of the text is fully justified, k2pdfopt thinks that line, because not fully justified, has ended a paragraph. I could consider having an adjustable threshold setting for this, but for now this determination cannot be adjusted.

2. The -ws option, as you have discovered, can be tuned to a small value to allow k2pdfopt to re-flow between the characters (really should be -ws 0, not -ws -0 -- I'll have to fix that). As you can see in the attachment, k2pdfopt is correctly separating all of the Chinese characters with this setting.

3. The additional option -bp[-] that you put doesn't do anything. The brackets are used to indicate optional suffixes, e.g. when the command-line usage says -bp[+|-|--], it means you can put one of these four options: -bp, -bp+, -bp-, or -bp--.
Attached Thumbnails
Click image for larger version

Name:	screenshot.png
Views:	315
Size:	95.2 KB
ID:	160708  

Last edited by willus; 12-16-2017 at 11:30 PM.
willus is offline   Reply With Quote