GithubHelp home page GithubHelp logo

2-column PDF REFLOW failure about koreader HOT 3 CLOSED

koreader avatar koreader commented on May 10, 2024
2-column PDF REFLOW failure

from koreader.

Comments (3)

willus avatar willus commented on May 10, 2024

This is probably an issue with the internal k2pdfopt settings (k2pdfopt library does the re-flow). See the -ch option here: http://willus.com/k2pdfopt/help/options.shtml. This sets the min_column_height_inches variable in the k2pdfoptsettings structure, which defaults to 1.5 inches. Any region less than 1.5 inches tall will not be broken into multiple columns.

There are two other internal variables in the k2pdfoptsettings structure that affect when k2pdfopt will re-flow a region: no_wrap_height_limit_inches and no_wrap_ar_limit (aspect ratio limit). They are set equal to 0.55 and 0.2, respectively. That is, if the region is taller than 0.55 inches or has a height-to-width ratio > 0.2, it won't be re-flowed. These values can be set with the undocumented command-line options -whmax and -arlim, respectively.

from koreader.

chrox avatar chrox commented on May 10, 2024

This really touches the deep corner of k2pdfopt. Maybe supervised segmentation and reflow is a better choice. But it will be really challenging to implement in koreader.

from koreader.

chrox avatar chrox commented on May 10, 2024

Text reflow is never a silver bullet and you can always find some rare layouts that will fail the reflowing. It's better to focus failures on real text page and issue a bug report. Will close this now.

from koreader.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.