View Single Post
Old 11-10-2013, 01:41 PM   #776
jshzh
Addict
jshzh could sell banana peel slippers to a Deveel.jshzh could sell banana peel slippers to a Deveel.jshzh could sell banana peel slippers to a Deveel.jshzh could sell banana peel slippers to a Deveel.jshzh could sell banana peel slippers to a Deveel.jshzh could sell banana peel slippers to a Deveel.jshzh could sell banana peel slippers to a Deveel.jshzh could sell banana peel slippers to a Deveel.jshzh could sell banana peel slippers to a Deveel.jshzh could sell banana peel slippers to a Deveel.jshzh could sell banana peel slippers to a Deveel.
 
Posts: 320
Karma: 3394
Join Date: Aug 2009
Device: Pocketbook 602 Pro, Kobo Aura HD, LG G Pad III
Quote:
Originally Posted by chrox View Post
Suggested solutions:
1) (no problem in scroll mode) In page mode you need to turn on the "DSHOWOVERLAP" option in defaults.lua by changing line 35 into
Code:
DSHOWOVERLAP = true
2) (no problem in scroll mode) Same as in 1).

3) Manual cropping will remember cropping box for odd page number and even page number so you only need to define page boxes for two pages(an odd page and an even page) if the content boxes are regular in all pages. If not, auto/semi-auto page cropping will be useful to automatically crop the white margins. In auto/semi-auto cropping mode additional page margins are added around calculated content area. Fortunately the additional margin sizes are totally customizable in koreader although its not accessible in the graphic user interface. You can edit the line 64 of "frontend/ui/data/koptoptions.lua" and change
Code:
values = {0.05, 0.10, 0.15},
into comfortable values. And you may also need to change the default page margin at around line 47 in defaults.lua. To make edited options take effect in previously opened books, you need to select corresponding options in the bottom configuration panel at least once.
Thank you, chrox.

I know nothing about Linux but I am using Editpad Lite 7 now to configure the values, following your suggestions. 1) and 2) work perfectly.Odd and even page manual cropping also works well.

As to auto/semi-auto cutting, since I have no idea how the calculation is done, I wonder what the default page margin means/is for. It is set to 0.10 currently in the range of 0-1. If I set it to 0.5, does it mean that the auto/semi-auto will cut off 0.5 and up (+0.05, 0.10, 0.15) based on its calculation? By the same token, I also wonder what [CODE]values = {0.05, 0.10, 0.15} means. The finer the difference between the values, the more accurate the cutting? Auto cutting will choose the closest of the following three (0.55, 0.60, 0.65) if the default is 0.5) in accordance with its calculation?

Edited: In my current experiment, I set the default to 0.5 and [CODE]values = {0.2, 0.3, 0.4} When I choose auto cutting, the margin seems not cut at all. When I choose semi-auto cutting, the adjustable frame is huge and I can only move the left and bottom sides together, the other two sides invisible - the result is nothing gets cut. Manual cutting stops working too.

If I don't change the [CODE]values = {0.05, 0.10, 0.15} and set default to 0.5, nothing gets cut. I haven't tried if with this configuration manual cutting works.

I actually read your old posts on this margin cutting issue and the conversation between you and talemix but still couldn't figure out how it is supposed to work. Maybe there is a tutorial somewhere online? This is the impression I got from reading old posts and my experiment:

For both scanned and text-based pdf files:
1) Auto cropping won't be auto. The margin to be cut in auto is determined in previous settings semi-auto and the margin is fixed with a lot of blank space. "Fit the width of contents" is not a snug fit.
2) Semi-auto setting that fits the content snugly won't stay after quitting the setting. If one switch to manual at this stage, the snug semi-auto setting is there, click ok, the setting will be kept through manual. However, this setting is not sensitive to the position of the content in each page. You mentioned that this sensitivity is the advantage of auto/semi-auto cropping. The position of the cropping frame is fixed like settings made directly via manual.

Last edited by jshzh; 11-10-2013 at 08:31 PM.
jshzh is offline   Reply With Quote