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

A wkhtmltopdf footer that sits too high, disappears, clips, or overlaps page content is usually a page-layout configuration problem—not a single broken setting. Verify the exact binary and option scope, reserve space with --margin-bottom, tune --footer-spacing separately, and inspect the footer HTML’s real height. Change one variable per render so you can identify whether the cause is the document, option passing, wrapper, or wkhtmltopdf build.

What controls footer position in wkhtmltopdf?

The upstream 0.12.6 usage manual defines two controls that are often confused:

  • --margin-bottom sets the page’s bottom margin.
  • --footer-spacing sets the distance between the footer and the document content, in millimetres. The documented default is 0.

Spacing is not a substitute for reserving enough bottom margin for a tall HTML footer. A footer document can contain several lines, padding, borders, images, or browser-default margins. Its actual height must fit in the page area left by your margins and content flow.

You can supply a footer in three ways: an external document with --footer-html, simple text with --footer-left, --footer-center, or --footer-right, and an optional rule with --footer-line. Page-number substitutions such as [page] and [topage] are supported by the command-line manual. Source: wkhtmltopdf 0.12.6 usage manual.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
#1 Best Overall
Epson EcoTank ET-2800 Wireless Color All-in-One Supertank Printer - Black
  • INNOVATIVE CARTRIDGE-FREE PRINTING — No more dealing with lots of tiny ink cartridges; With this wireless document and photo printer each ink bottle set is equivalent to about 90 individual cartridges²
  • LESS FREQUENT INK REPLACEMENT — Replacement ink bottles don't have to be changed nearly as often as ink cartridges¹; When you choose this combination printer, scanner and copier you can print up to 4,500 pages black/7,500 color³
  • COLOR PRINTING — Up to 2 years of ink in the box4 (and with every replacement ink set) for fewer out-of-ink frustrations
  • ZERO CARTRIDGE WASTE — By using an Epson EcoTank printer you can help reduce the amount of cartridge waste ending up in landfills
  • HOME PRINTER DESIGNED FOR RELIABILITY — The Epson EcoTank ET-2800 All-in-One Supertank Color Printer creates vivid, detailed prints and documents thanks to Micro Piezo Heat-Free Technology; Fire off 10 ISO pages per minute1 to easily finish large jobs

Start with the binary, build, and command you actually run

Before changing CSS, record the environment. Different packages can expose different options and rendering behaviour. The upstream manual describes a patched-Qt build, while the Debian Bookworm manpage explicitly identifies its package as not using patched Qt.

  1. Run wkhtmltopdf --version and save the complete output.
  2. Record the operating system, package or installer source, and the wrapper (for example, a framework PDF library) if one is involved.
  3. Copy the complete command, including page size, orientation, margins, header and footer options.
  4. Note whether the footer is plain text or an external HTML file, and record that file’s dimensions, CSS, images, and scripts.
  5. Save a generated PDF that demonstrates the problem.

Use the same information when consulting the Debian Bookworm wkhtmltopdf manpage; do not assume a distribution build behaves exactly like the upstream patched-Qt documentation.

Put options in the correct scope

wkhtmltopdf distinguishes global options from per-object options. Global options belong in the global-options area, before the input page object; page-specific options follow the relevant page input. A wrapper may also translate, rename, or silently drop settings.

First run the raw binary with a minimal command. If that works, compare it with the wrapper-generated command or enable the wrapper’s command logging. This separates an HTML/layout issue from an option-passing issue.

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

Fix a footer that is too high or overlaps content

1. Reserve bottom space deliberately

Set a bottom margin that can contain the complete footer, then render. Increase it in small steps if the footer overlaps the last lines of body text or is clipped at the page edge. There is no universal correct millimetre value: page size, font metrics, footer height, content, and build all matter.

Rank #2
Sale
Epson EcoTank Photo ET-8550 Wireless Wide-Format All-in-One Tank Printer
  • CARTRIDGE-FREE PRINTING — Print lab-quality photos, graphics and creative projects; Get vibrant colors and sharp text with Epson's high-accuracy printhead and Claria ET Premium 6-color inks
  • INK BOTTLES — Save on photos1 and creative projects with affordable in-house printing; All-in-one printer allows you to print 4" x 6" photos for about 4 cents each vs. 40 cents with traditional ink cartridges1
  • LESS FREQUENT INK REPLACEMENT — Replacement ink bottles don't have to be changed nearly as often as ink cartridges¹; Printer, scanner and copier lets you print up to 6,200 color pages³
  • PRINT FOR LONGER — Up to 2 years of ink in the box² (and with every replacement ink set) for fewer out-of-ink frustrations with this wireless printer
  • ZERO CARTRIDGE WASTE — Epson EcoTank printer helps reduce the amount of cartridge waste ending up in landfills; Cartridge-free printer uses high-yield ink bottles; Each replacement ink bottle set is equivalent to about 100 individual ink cartridges⁴

2. Tune the gap independently

After the footer fits, adjust --footer-spacing to control the gap between body content and the footer. Change only this option in the next render. A larger gap can move the footer visually without creating enough page area for a multi-line footer, so keep the deliberate bottom margin.

3. Check page breaks

Inspect the final body page. A footer may appear to overlap when the body contains a large unbreakable table, absolutely positioned content, negative margins, or a fixed-height element. Remove those layout constraints in a minimal reproduction and compare the result.

Fix an external HTML footer

With --footer-html footer.html, the footer is a separate HTML document. Inspect it as a page, not just as a fragment pasted into the main file.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
  • Remove the footer document’s default body margin unless you intentionally need it.
  • Measure the combined height of text, line-height, padding, borders, and images.
  • Reduce unnecessary whitespace and oversized images.
  • Reserve enough --margin-bottom for that measured content.
  • Use stable, accessible asset URLs and confirm that fonts and images load in the conversion environment.

The manual’s HTML-footer example reads values supplied to the footer/header document and inserts them into elements with matching classes. Use the documented page-number substitutions rather than hard-coding a page count.

Minimal footer example

Save this as footer.html while diagnosing:

<!doctype html>
<html>
<head>
  <meta charset="utf-8">
  <style>
    html, body { margin: 0; padding: 0; font: 9pt Arial, sans-serif; }
    .footer { width: 100%; text-align: center; }
  </style>
</head>
<body>
  <div class="footer">Page <span class="page"></span> of <span class="topage"></span></div>
</body>
</html>

Run a controlled test with your main document:

wkhtmltopdf --page-size A4 --margin-bottom 20mm --footer-html footer.html --footer-spacing 3 input.html output.pdf

The numbers above are a starting point for diagnosis, not a guaranteed recipe. Increase or decrease one setting, render again, and inspect clipping, overlap, and the distance from the body.

Rank #3
HP Smart Tank 5000 Wireless All-in-One Ink Tank Printer, Scanner, Copier with 2 Years of Ink Included, Best-for-Home, Cartridge-Free, Refillable and AI-Enabled. (5D1B6A)
  • SET IT UP ONCE AND PRINT WITH CONFIDENCE. No complicated maintenance. Just easy, reliable printing you can count on.
  • INK FOR YEARS. NOT MONTHS. Up to 2 years of ink included. Get thousands of pages of cartridge-free printing. More pages, less hassle
  • KEEPS PRINTING WELL AFTER COMPETITORS HAVE QUIT. No complex maintenance. Sharper text, richer colors.[2] Only with HP Smart Tank
  • PREMIUM SUPPORT - Strong technical expertise to solve issues faster
  • THE LAST PRINTER YOU'LL EVER NEED. Enjoy years of refillable, cartridge-free printing.

When a header changes footer placement

If both header and footer are enabled, hold the header settings constant while testing footer settings. Then inspect --header-spacing and --margin-top. The libwkhtmltox page-settings reference warns that excessive header spacing can cause the header to be printed outside the PDF and notes that adjusting the top margin can correct it. The analogous footer settings are exposed through the API.

Do not assume that a footer-only defect is independent of header configuration. A header that consumes unexpected space, or a wrapper that changes option order when both are present, can alter page flow.

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

Reference: libwkhtmltox page settings.

Plain-text footer versus HTML footer

Configuration Use it when Positioning considerations
--footer-left/center/right You need short text, a date, or page numbers. There is little internal layout to debug, but reserve bottom margin and tune spacing.
--footer-html You need branding, multiple fields, conditional markup, or richer styling. Document height, body margins, assets, and CSS all affect the space required.

Version-specific symptoms: useful leads, not universal fixes

Historical reports demonstrate why reproduction details matter. GitHub issue #1988 records a 2014 report in which --header-spacing 60 was associated with a footer appearing high; the report also says adding --footer-spacing 10 did not change that reproduction and that footer spacing without header spacing hid the footer. GitHub issue #4724, opened June 17, 2020, describes wkhtmltopdf 0.12.6 on Windows 10 through Laravel Snappy; its author reports unexpected header-spacing behaviour when adding only a footer and says an empty header changed the result.

These are user-reported, version-specific reproductions—not rules for every installation. Do not add an empty header as a general fix. If your symptom matches, test it only in a minimal reproduction with the same binary and options.

A repeatable isolation procedure

  1. Create a tiny body HTML with two or three paragraphs and a tiny footer HTML.
  2. Run the raw binary with one page size and no header.
  3. Add --margin-bottom, render, and inspect the PDF.
  4. Add or change --footer-spacing, render again.
  5. Add the real footer’s CSS and assets.
  6. Add the header without changing footer values.
  7. Finally run the wrapper and compare its effective command with the raw invocation.

Make one change per render and keep the PDFs. This gives you a visual record of which setting introduced clipping, overlap, disappearance, or unexpected movement.

Rank #4
NDYIN Portable Printers Wireless for Travel, N80 Bluetooth Thermal Printer
  • Wireless Bluetooth Printer: Portable thermal printer compatible with iPhone, Android phones, iPad and tablet computers via Bluetooth. For smartphones, please download the "Nada Print" App. You can also connect to laptops and computers for printing using a USB-C cable. (Note: Laptops and computers can only be connected via USB and require the installation of a driver first. Bluetooth connection is not supported.)
  • No-ink printing: Only supports US Letter and A4 size thermal paper.(Doesn't support regular paper) The no-ink portable thermal printer uses direct thermal technology, requiring no ink, toner or ribbons, making it environmentally friendly, cost-effective and time-saving. The thermal printer package comes with a roll of US Letter thermal printing paper. Note: When installing the paper, remember to switch the paper size switch on APP
  • Clear Print: NDYIN N80 portable thermal printer adopts high-definition printing technology, with a 203DPI resolution to provide you with clear printing results. This mobile printer is compatible with roll paper, folded paper and tattoo transfer paper, supporting printing from your mobile phone PDF, Word, pictures and web pages anytime and anywhere. It is recommended to use our NDYIN thermal paper to achieve good printing quality
  • Portable wireless printer for travel: The thermal printer is equipped with a built-in 1500mAh rechargeable battery, which can print 160 sheets of 8.5" x 11" thermal paper after being fully charged. It weighs only 1.5 pounds and is compact in size. This ink-free portable printer can be easily carried in a backpack or briefcase! It is perfect for business travel, cars, small offices, construction sites, schools and homes. You can print documents, contracts, invoices and boarding passes anytime and anywhere
  • The N80 thermal printer has a wide range of uses. The package includes the N80 printer, a roll of US Letter paper(7m/roll), a user manual, a guide card, a type-C soft cable and a type C adapter. Note: The charging adapter is not included. Special thermal paper is required for use; ordinary paper cannot be used. This ink-free portable thermal printer is suitable for various scenarios such as home, school, travel, office, and outdoor, meeting the printing needs of different groups of people. This tattoo template printer is also compatible with tattoo transfer paper, making it an ideal choice for tattoo art
Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

Troubleshooting checklist

Footer is clipped at the bottom

  • Increase --margin-bottom.
  • Inspect footer body margins, padding, line-height, and image height.
  • Confirm the footer HTML loads all assets in the conversion environment.

Footer overlaps the last paragraph

  • Reserve more bottom margin.
  • Reduce --footer-spacing only after the footer has room.
  • Check for fixed, absolute, or negative-margin body elements.

Footer is too far from the body

  • Reduce --footer-spacing in small increments.
  • Remove unintended whitespace in the footer document.
  • Check whether a wrapper added an extra margin or padding value.

Footer disappears

  • Verify the footer option is supported by wkhtmltopdf --extended-help and your installed build.
  • Confirm the option is in the correct global or object scope.
  • Open the footer URL or file independently and check for load errors.
  • Try the minimal footer HTML to distinguish content failure from binary behaviour.

Page numbers are blank

  • Use the documented substitutions such as [page] and [topage] in supported footer text or the matching HTML-footer elements.
  • Confirm your wrapper passes these values rather than escaping or removing them.

Only the wrapper fails

  • Capture the wrapper’s generated command.
  • Run that command directly.
  • Compare option names, ordering, paths, page size, and margin units with your intended settings.

Performance, reliability, and maintenance notes

Footer rendering is deterministic only when the input and environment are controlled. Pin the wkhtmltopdf build used in production, keep footer assets local or reliably reachable, and include a representative multi-page PDF in regression tests. Test short and long body pages, a last page containing a table, and the presence or absence of a header.

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

When upgrading a package or switching operating systems, re-run the minimal reproduction before changing production margins. A different Qt patch level, font set, wrapper, or option support can change measured layout without any change to your HTML.

Or skip the browser setup

If your goal is a clean image or PDF of a web page rather than a wkhtmltopdf document with custom footer controls, ScreenshotNeo provides a single-call website screenshot API. It accepts consent banners before capture and removes more than 60 known consent platforms, newsletter popups, and chat widgets; each step can be disabled. Bot checks or CAPTCHAs, blank pages, timeouts, failed loads, and cache hits are not billed, and response headers report the page verdict and billing status. Its MCP server exposes take_screenshot, get_page_info, and capture_pdf for Claude, Cursor, and other MCP clients.

cURL:

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

Python:

import requests
r = requests.get("https://api.screenshotneo.com/v1/shot", params={"access_key": "YOUR_API_KEY", "url": "https://stripe.com"}, timeout=90)
open("shot.webp", "wb").write(r.content)

Node.js:

const q = new URLSearchParams({ access_key: 'YOUR_API_KEY', url: 'https://stripe.com' });
const res = await fetch(`https://api.screenshotneo.com/v1/shot?${q}`);

See the complete option list and response details in the ScreenshotNeo documentation. Every plan includes the features: full-page and element capture, device and retina settings, dark mode, custom CSS and JavaScript, waits, request blocking, headers and cookies, geolocation and timezone, resizing, caching, signed links, asynchronous webhooks, bulk capture, usage data, PDF controls, and HTML/CSS-to-image. The free plan includes 1,000 screenshots per month with no card; paid plans start at $5 for 3,000 shots. Create a free ScreenshotNeo account.

Key references

Frequently Asked Questions

What is the difference between bottom margin and footer spacing?

Bottom margin reserves space at the page edge; footer spacing controls the gap between the footer and body content. A tall footer may require both.

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

Should I add an empty header to fix a footer?

Only test that in a minimal reproduction if your installation matches the historical issue report. It is not a general wkhtmltopdf fix.

Why does the same command behave differently on another server?

The binaries may differ in version, Qt patch level, fonts, package build, wrapper, or supported options. Compare wkhtmltopdf --version and the effective command first.

Quick Recap

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.