Page-break settings accepted by the html2pdf.js compatibility layer.
Signature
export interface CompatPageBreakOptions {
mode?: "css" | "legacy" | "avoid-all" | readonly ("css" | "legacy" | "avoid-all")[];
before?: string | readonly string[];
after?: string | readonly string[];
avoid?: string | readonly string[];
}Properties
| Property | Type | Required | Read only | Default | Description |
|---|---|---|---|---|---|
mode | "css" | "legacy" | "avoid-all" | readonly ("css" | "legacy" | "avoid-all")[] | No | No | css and legacy | Compatibility modes. Defaults to css and legacy. |
before | string | readonly string[] | No | No | None | Selectors forced to begin on a new page. |
after | string | readonly string[] | No | No | None | Selectors forced to end the current page. |
avoid | string | readonly string[] | No | No | None | Selectors whose contents should avoid internal fragmentation. |