Open source · MIT · CLI and Playwright
breaklint checks the page that actually gets rendered.
Finds page-break and layout bugs in HTML documents that Paged.js typesets to PDF, and in your Playwright pages, with measured value, threshold and a CI exit code.
2013 px > 650 px
Before and after the fix.
Before
$ npx breaklint vorher.html FAIL findings block this run · exit 1 checked 5 pages in 1 document · error 1 · warn 146 · info 0 error layout/unbreakable-block-too-tall page 2 measured 2013 px; threshold 650.08 px (uncalibrated)
After
$ npx breaklint nachher.html PASS clean run · exit 0 checked 3 pages in 1 document · error 0 · warn 0 · info 0
- .zusammen { break-inside: avoid; } + .zusammen { break-inside: auto; } tr { break-inside: avoid; }
The table was told not to break and was taller than the page; now only the rows stay together.
Real breaklint 0.11.1 · 21 Nov 2026
How it was measured
- A test document of our own with made-up values.
- Pages rasterised with pdftoppm from the checked PDF.
- Frame: position taken from the breaklint report.
- 146 notes on single table rows left out.
Film · 0:39 · Instrumental music, no voice-over
What the film shows
- 0:00 Perfect in the browser. Broken on page 47. · Heading alone at the bottom · Page 48: two lines. That’s it. · Table fits on no page · Client: “What happened on page 47?” · Fri 17:58 · off to the printer · Chart label cut off · Did anyone check the PDF? · It looked fine in the browser. · Page: 1 → 212 / 212
- 0:06 212 pages. Check them by hand? Every single build?
- 0:10 One command. Every page measured.
- 0:13 Open source · MIT · breaklint · Layout checks for HTML to PDF, measured after pagination.
- 0:17 It tells you where it breaks. · Real output
- 0:21 Page 1: heading stranded. · Sample · page 1
- 0:25 Page 4: 5 % filled. · Sample · page 4
- 0:29 Every finding shows its numbers. · Widows & orphans · Stranded headings · Blocks too tall to fit · SVG text overflow
- 0:33 Catch it before your client does. · Free · open source · MIT · npx breaklint --demo
Install it, then run it
Try it without installing: npx breaklint --demo checks a bundled example with deliberate faults, so it ends with exit 1.
Installation for real documents
npm i -D breaklint
npm i -D puppeteer-core@^25.16.0 pagedjs@0.4.3 pdfjs-dist@6.2.108
- Version 0.11.1
- MIT licence
- Node 22.13 or newer
- macOS and Linux
Then npx breaklint chapter.html checks your document, with a Chromium browser on the machine. Exit 0: checked and clean. Exit 4: too little measurable, no verdict.
For GitHub Actions: uses: godarg/breaklint@v0.11.1, template in the CI recipe on GitHub ↗.
In your Playwright tests
checkPage checks a page your test has already opened for horizontal overflow, clipped content and SVG text running past its frame. Optionally also for overlapping elements, text that is too small and tap targets that are too small. Navigation and login stay with your test.
import { checkPage } from "breaklint";
// page: opened by your test
const { report } = await checkPage(page, {
trust: "host-controlled-page",
networkPolicy: "host-owned",
scenario: "start",
output: {
dir: "layout",
screenshot: "viewport",
},
});
// report only at first;
// make it blocking once findings fit:
// expect(report.runVerdict).toBe("clean")
What it checks
For print HTML (Paged.js): seventeen rules, twelve of them on by default. Only the two error rules fail a build, unless you ask for more with --fail-on warn.
layout/Unbreakable block taller than the pageerror · defaultunbreakable-block-too-tall svg/Text beyond the SVG viewporterror · defaulttext-overflows-viewport
- PaginationWidows and orphans, headings at the page foot, hyphens across the break, leftover pages, half-empty pages
- TypographyHyphen instead of dash, straight quotes, short last lines, loose word spacing
- Figures and tablesSeparated captions, references without a target, missing table headers, drifting columns
- Artefactsfile: references and build-machine paths
All 17 rules
Pagination
layout/Unbreakable block taller than the pageerror · defaultunbreakable-block-too-tall layout/A single line carried to the top of the next pagewarn · defaultwidow layout/A single line left at the foot of a pagewarn · defaultorphan layout/Heading stranded at the foot of a pagewarn · defaultheading-at-page-bottom layout/Page holding only the tail of a blockwarn · defaultorphaned-continuation-page layout/Hyphenation across the page breakwarn · defaulthyphen-across-page layout/Half-empty page, experimentalwarn · optionalhalf-empty-page
SVG
svg/Text beyond the SVG viewporterror · defaulttext-overflows-viewport
Typography
type/Hyphen instead of a dashwarn · defaultspaced-hyphen type/Straight quotes in running textwarn · defaultstraight-quotes type/Last line too shortwarn · defaultshort-last-line type/Overstretched word spacingwarn · defaultexcessive-word-spacing
Artefacts
artifact/file: references and build-machine pathswarn · defaultlocal-uri
Figures and tables
figure/Caption on a different page from its figurewarn · optionalcaption-separated figure/Local reference without a targetwarn · optionaldangling-reference layout/Table header missing on a continuation pagewarn · optionaltable-header-not-repeated layout/Column edges drift from the header rowwarn · optionaltable-column-drift
--profile strict switches the optional rules on.
Limits you should know
- UncalibratedEvery threshold is a starting value:
calibrated: false. - No footnotesPaged.js footnotes stop before the check with exit 3.
- Fonts must loadIf a declared font fails, the run stops.
- Isolate foreign HTMLThe document’s scripts run: check foreign files only in a container without network.
- Not a replacement for
veraPDForpdfcpu(PDF standards), visual-diff tools (image comparison),valeortypopo(style and prose).
Why this exists
Prose linters never see a page. Typesetting systems see the page but do not know German typographic convention. For documents generated from HTML to PDF, neither existed.
It started with a chart that passed an XML validity check and a geometry check and still came out of the renderer with colliding labels. Whether a page works is decided in the renderer, with the fonts that were actually loaded.
Open community test · unpaid
Where do the measurement and a human eye disagree?
Anyone can test public or purpose-built HTML, no application needed; the guide takes about ten minutes to a report.
What becomes public
Use only material you have the right to publish: your GitHub identity, report and reproduction are public. Confidential documents, personal data and security findings do not belong in the form; submitted content is never executed.
Where it comes from
breaklint comes from Dargel Solutions, is free to use under the MIT licence and was written with AI help. Rules that cite the official German orthography rules are checked against their published text. At check time it uses no language model and no network.
Generative AI is used to create, maintain and review this page. Dargel Solutions is responsible for publication. How we work
breaklint is listed in the PeerPush directory ↗.