Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

First identify where the content is being cut: a line, row, or image split across pages is a vertical page-break issue; text missing at the right edge is horizontal overflow. wkhtmltopdf documents limitations in WebKit’s pagination, so CSS and command-line adjustments can improve particular layouts but cannot guarantee that every element stays intact. Work from the exact symptom and installed build rather than relying on a single “fix.”

Tell a page break from clipping at the right edge

  • Vertical split: A line, table row, or image is divided between two pages, or content near the bottom of a page is cut. Check pagination and available page space.
  • Horizontal clipping: Text or other content disappears at the right edge. Check width, overflow, wrapping, margins, and scaling rather than starting with page-break CSS.
  • Missing or incomplete content: If content is absent rather than divided, check whether the page finished loading before conversion.

The distinction matters: a setting that changes vertical pagination may not fix an element wider than the printable page. The project has separate reports for bottom-of-page splitting and right-side truncation: issue #5139 and issue #4080.

Why wkhtmltopdf splits content

The wkhtmltopdf usage documentation explains that WebKit renders content as one long page and then cuts it into pages. Its documentation warns that this can split lines and images, and says the current WebKit page-breaking algorithm “leaves much to be desired.” This means a split may come from pagination rather than missing or malformed source HTML. The documentation presents CSS page-break-inside as a partial remedy with the patched-Qt version, not a universal guarantee. See the project’s usage documentation, “Page Breaking” section.

Diagnose the problem on the actual binary

  1. Save a minimal reproduction. Keep the exact HTML and the assets it needs. Run that input through the same wkhtmltopdf executable used by your application, outside any wrapper if possible. This helps separate renderer behavior from wrapper configuration.
  2. Record the environment. Capture the output of wkhtmltopdf --version, operating system, how the package was built or installed, page size, margins, and whether the build uses patched Qt. The project manual describes version 0.12.6 with patched Qt; do not assume your installed build is identical.
  3. Change one variable at a time. Save a baseline PDF, adjust one setting, and compare the same page and content. Record whether the change affects the split, clipping, font size, line wrapping, or total page count.
  4. Check the output at the affected boundary. For vertical issues, inspect the last content block on one page and first block on the next. For horizontal issues, inspect the widest element and its computed width, as well as the printable width after margins.

A report opened on November 18, 2021 describes bottom text, headers, and tables split or cut off with wkhtmltopdf 0.12.6 on CentOS 7, but it does not confirm a fix. A report opened on September 11, 2018 describes right-edge truncation. These examples show why the version and symptom should be recorded; they do not establish how every build behaves.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
#1 Best Overall
Brother DCP-L2640DW Wireless Compact Monochrome Multi-Function Printer, Copy, Scan, Duplex, Mobile Printing
  • BEST FOR SMALL BUSINESSES – Engineered for extraordinary productivity, the Brother DCP-L2640DW Monochrome (Black & White) 3-in-1 combines laser printer, scanner, copier in one compact footprint and delivers high-quality black & white prints
  • FAST PRINTER WITH EFFICIENT SCANNING – Produces documents quickly with print speeds up to 36 ppm(2) and scan speeds up to 23.6/7.9 ipm(3) (black/color). A 50-page auto document feeder(4) allows for convenient, time saving multi-page scanning and copying
  • FLEXIBLE CONNECTION OPTIONS – Easily navigate the changing demands of your business with secure multi-device connectivity via built-in dual-band wireless (2.4GHz / 5GHz) and Ethernet. Or connect locally to a single computer via USB interface
  • BROTHER MOBILE CONNECT APP – Print, scan, and manage your wireless printer anytime, from almost anywhere from your mobile device. Order Brother Genuine Supplies, track toner usage, and complete more work on-the-go(5)
  • CHOOSE BROTHER GENUINE TONER – When it’s time to replace your toner, be sure to choose Brother Genuine TN830 or TN830XL replacement toner. And with Refresh EZ Print Subscription Service, you’ll never worry about running out of toner again and you’ll enjoy savings of up to 50%(6) on Brother Genuine Toner. Get started with Refresh today with a Free Trial(1)

Improve vertical page breaks

Give the renderer natural break points

Organize content around sensible boundaries such as paragraphs, sections, and table groups. Layouts assembled from separately positioned pieces that must stay aligned across a page are especially vulnerable when a long rendered page is divided. The project documentation’s practical advice is to structure HTML so there are many lines where pages can break cleanly.

Keep selected blocks together

For a block that should not split, test this CSS in the exact build:

.keep-together { page-break-inside: avoid; }

Apply the class to a suitable element, for example:

<div class="keep-together">...content...</div>

The documented mitigation is associated with patched Qt and is explicitly partial. If a block is taller than the space remaining on the page—or cannot fit on a page at all—the renderer may have to move or split it. Test with your actual tables, images, and content lengths.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
Rank #2
Brother HL-L2405W Wireless Compact Monochrome Laser Printer with Mobile Printing, Black & White Output | Includes Refresh Subscription Trial(1), Works with Alexa
  • BEST FOR HOMES & HOME OFFICES – Engineered for consistent, premium print quality, the Brother HL-L2405W Monochrome (Black & White) Laser Printer delivers sharp, crisp prints at an affordable price. Prints one-sided documents at speeds up to 30ppm(2)
  • COMPACT, CONNECTED PRINTER – Flexible connection options make this an ideal printer for home use and at-home offices. Securely connect to multiple devices with built-in dual-band wireless (2.4GHz/5GHz) or locally to a single computer via USB interface
  • BROTHER MOBILE CONNECT APP – Manage your printer remotely and print from your mobile device anytime, from almost anywhere. Order Brother Genuine Supplies, track toner usage, and complete more work on-the-go(3)
  • VERSATILE PAPER HANDLING – Enjoy seamless, reliable everyday printing with the 250-sheet paper tray(4) and a manual feed slot that enables printing on envelopes and specialty pape
  • BROTHER IS AT YOUR SIDE – Backed by Brother with a 1-year limited warranty and free online, call, or live chat support for the life of your printer

Check the page size, orientation, and margins

Page geometry determines the space available for content and can change wrapping and page placement. The usage documentation gives A4 as the default page size and documents named page sizes, custom page width and height, and top, bottom, left, and right margins. Confirm the intended paper size and orientation, then check each margin against the content and any headers or footers.

Evaluate smart shrinking as a separate comparison

The manual says smart shrinking is enabled by default. --disable-smart-shrinking disables WebKit’s strategy for changing the pixel/DPI ratio. Compare enabled and disabled output only as a controlled test: it can alter scale and layout, but it is not documented as a general page-break fix. The issue reports include configurations with shrinking disabled while still reporting clipping, so the flag alone is not a dependable remedy.

Make print styles intentional

--print-media-type makes wkhtmltopdf use print styles instead of screen styles. If your page-break CSS is inside @media print, verify that print media is enabled and that the styles and assets needed in print mode load correctly. A page that looks fine in a browser’s screen view may use different dimensions or styles when converted.

Account for headers and footers

If content collides with or is clipped near a header or footer, review top and bottom margins together with header/footer spacing. The issue report includes headers and footers in its configuration but does not establish them as the cause or verify a particular correction.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
Rank #3
Sale
Canon imageCLASS LBP6030w - Monochrome Single-Function Wireless Compact Wireless Laser Printer, 1 Year Limited Warranty, 19 PPM, White - Print Only
  • FAST PRINT SPEEDS: Print up to 19 pages per minute.
  • COMPACT DESIGN: Space-saving, compact design fits anywhere in your home, school or small office.
  • WIRELESS CONNECTIVITY: Print from almost anywhere in your workspace using your compatible mobile device.
  • PAPER CAPACITY: Up to 150 sheets.
  • SUSTAINABILITY: Uses less than 2 watts in Energy Saver mode.

Fix right-edge truncation separately

  • Check whether the widest element exceeds the printable width after left and right margins are applied.
  • Look for fixed-width tables, images, or containers that do not shrink or wrap at the PDF page width.
  • Check overflow rules and long unbroken strings that can extend beyond their container.
  • Confirm page size, orientation, and margins before changing scale.
  • Compare smart-shrinking settings only after recording a baseline; disabling it can change the pixel/DPI relationship without correcting an oversized layout.

The report in issue #4080 shows right-side truncation despite acceptable browser appearance, with --disable-smart-shrinking in the example command. That is one reported configuration, not evidence that the option caused the problem or will fix it.

Check whether JavaScript content is ready

JavaScript is enabled by default in the documented options, and the documented default JavaScript delay is 200 milliseconds. If content is generated asynchronously, it may not exist when capture begins. The manual documents --javascript-delay, --window-status to wait for a specified window.status value, and --run-script to run a script after page load. Use these to address readiness, not as a cure for WebKit’s page-breaking behavior. See the documented command-line options.

Use a controlled command-line test

Start with a baseline command that specifies the page size and margins explicitly, then add or remove one option per comparison. For example:

wkhtmltopdf --page-size A4 --margin-top 15mm --margin-bottom 15mm --margin-left 15mm --margin-right 15mm input.html output.pdf

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
Rank #4
Brother HL-L2460DW Wireless Compact Monochrome Laser Printer with Duplex, Mobile Printing, Black & White Output | Includes Refresh Subscription Trial(1), Works with Alexa
  • BEST FOR HOME OFFICES & SMALL TEAMS – Engineered for consistent, premium print quality, the Brother HL-L2460DW Monochrome (Black & White) Laser Printer produces documents that are clear, crisp, and easy to review and share, all at an affordable price
  • COMPACT, CONNECTED, EXCEPTIONALLY EFFICIENT– Connect with built-in dual-band wireless (2.4GHz/5GHz), Ethernet, or to a single computer via USB interface. Prints at speeds up to 36ppm(2), plus automatic duplex printing saves time and reduces paper waste
  • BROTHER MOBILE CONNECT APP – Manage your wireless printer remotely and print from your mobile device anytime, from almost anywhere. Order Brother Genuine Supplies, track toner usage, and complete more work on-the-go(3)
  • VERSATILE PAPER HANDLING – Tackle high-volume black & white printing with the 250-sheet capacity paper tray.(4) The manual feed slot enables printing on envelopes and specialty paper
  • BROTHER IS AT YOUR SIDE – Backed by Brother with a 1-year limited warranty and free online, call, or live chat support for the life of your printer

To test print styles or shrinking, compare separate runs:

wkhtmltopdf --print-media-type --page-size A4 input.html print.pdf

wkhtmltopdf --disable-smart-shrinking --page-size A4 input.html no-shrink.pdf

These are diagnostic examples, not universal production settings. Choose margins and paper size for your document. Avoid changing media mode, scaling, margins, and JavaScript wait behavior simultaneously: if the PDF changes, you will not know which variable mattered.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
Best Value
HP LaserJet M110w | Monochrome | Laser Printer
  • FROM AMERICA'S MOST TRUSTED PRINTER BRAND – Perfect for small teams printing professional-quality black & white documents and reports. Perfect for 1-3 people
  • WORLD'S SMALLEST LASER IN ITS CLASS – Precision laser printing that fits anywhere
  • FAST PRINT SPEEDS – Up to 21 black-and-white pages per minute single-sided
  • WIRELESS WITH SELF-RESET – Helps you stay connected
  • PRINT FROM ANY DEVICE – Wireless printing from any mobile device, PC or tablet. Works with Microsoft, Mac, AirPrint, Android, Chromebook and more
Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

Troubleshoot common failure patterns

Symptom Likely area to inspect Next step
A line or image is divided across pages WebKit pagination and content boundaries Try selective page-break-inside: avoid in a patched-Qt build and reorganize content around clean break points.
A table row or bottom text is split or clipped Pagination, page geometry, and available space Check the exact build, margins, page size, and whether the block can fit in the remaining page area.
Text disappears at the right edge Printable width, overflow, wrapping, or scale Inspect fixed-width elements and margins; compare scale settings separately.
Print-only break rules have no effect Media mode or print styles Test with --print-media-type and verify that print CSS and assets load.
Dynamic text or images are missing Page readiness Test a deliberate JavaScript delay, status wait, or post-load script using the documented options.
Changing smart shrinking makes the layout worse Changed scale and wrapping Restore the baseline and compare enabled versus disabled output without treating either mode as a page-break fix.
A CSS break rule works on one machine but not another Different wkhtmltopdf build or Qt configuration Record version, operating system, package source, and patched-Qt status; reproduce on the deployed binary.

Or skip the browser setup

If the goal is to capture a webpage rather than diagnose a wkhtmltopdf layout, ScreenshotNeo is a website screenshot API and MCP server. A single GET request can return an image or PDF. For example, cURL:

curl -G "https://api.screenshotneo.com/v1/shot" -d access_key=YOUR_API_KEY --data-urlencode url=https://stripe.com -o shot.webp

See the ScreenshotNeo API documentation for request options. Cookie banners are accepted and removed along with known consent platforms, newsletter popups, and chat widgets before capture; those steps can be turned off. Bot checks, blank pages, failed loads, timeouts, and cache hits are not billed. Its MCP server provides screenshot tools for AI agents, and the free plan includes 1,000 screenshots a month with no card; paid plans start at $5 for 3,000 shots. Sign up free for ScreenshotNeo.

When to consider a different PDF workflow

If a page-break rule cannot produce acceptable output in the exact wkhtmltopdf build, first confirm that the HTML and print layout have sensible break opportunities and that the PDF requirements are met. If you need fidelity for complex print layouts, evaluate an alternative rendering workflow against the same minimal input and compare the resulting pagination and styles. The evidence here does not establish a universally superior replacement or a guaranteed fix for every wkhtmltopdf build.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Frequently asked questions

Does page-break-inside: avoid guarantee that an element will stay on one PDF page?

No. The wkhtmltopdf documentation describes it as a partial remedy for patched-Qt builds. A block that cannot fit in the available space may still be moved or split.

Is --disable-smart-shrinking the standard fix for cut-off content?

No. It changes WebKit’s shrinking strategy and may affect scale and wrapping; the manual does not describe it as a general pagination fix.

What should I include when reporting a reproducible problem?

Provide a minimal HTML input with required assets, the exact command, the PDF symptom, wkhtmltopdf --version, operating system, package/build details, and page geometry.

Quick Recap

SaleBestseller No. 3
Canon imageCLASS LBP6030w - Monochrome Single-Function Wireless Compact Wireless Laser Printer, 1 Year Limited Warranty, 19 PPM, White - Print Only
Canon imageCLASS LBP6030w - Monochrome Single-Function Wireless Compact Wireless Laser Printer, 1 Year Limited Warranty, 19 PPM, White - Print Only
FAST PRINT SPEEDS: Print up to 19 pages per minute.; PAPER CAPACITY: Up to 150 sheets.; SUSTAINABILITY: Uses less than 2 watts in Energy Saver mode.
$103.99
Bestseller No. 5
HP LaserJet M110w | Monochrome | Laser Printer
HP LaserJet M110w | Monochrome | Laser Printer
WORLD'S SMALLEST LASER IN ITS CLASS – Precision laser printing that fits anywhere; FAST PRINT SPEEDS – Up to 21 black-and-white pages per minute single-sided

Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.

Free tools Windows power users keep installed

One-click scans. No signup required.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.