Skip to content

happypdf / BreakStrategy

Type Alias: BreakStrategy

ts
type BreakStrategy = "greedy";

Defined in: src/api/text/wrap.ts:21

Which algorithm chooses the break points.

greedy fills each line until the next segment no longer fits. It is O(n) and matches the behaviour of most browsers. This is currently the only strategy; the option exists so that an optimal (Knuth-Plass) strategy can be added later without an API change.

MIT Licensed. A fork of pdf-lib.