Do these 3 things before closing this tab:
1Clear out junk files and repair common Windows errors2Fix the driver behind crashes, sound loss and screen glitches3Repair Windows errors before they cause bigger problemsUse wkhtmltopdf’s positional header and footer settings for short text, or point it to an HTML document when you need more layout control. Set page margins separately from header/footer spacing so the content and repeating elements have room to render.
Choose text settings or an HTML document
wkhtmltopdf supports left, center, and right text in both headers and footers. The settings also include font controls, a rule line, and spacing. For a more designed banner or other custom layout, you can supply a separate HTML document URL instead. These approaches offer different levels of layout control and markup complexity; the project does not identify one as universally preferable.
The project describes wkhtmltopdf as an open-source command-line tool that renders HTML to PDF using Qt WebKit. Project overview.
As an Amazon Associate I earn from qualifying purchases.
Add a simple repeating header or footer
The settings reference defines the relevant names as header.left, header.center, and header.right; footer settings use the corresponding footer.* names. Header and footer settings can be associated with an individual page object. Consult the help or manual for the wkhtmltopdf version installed on your machine for exact command-line syntax and supported values.
Start by checking your build’s available options:
#1 Best Overall
wkhtmltopdf --help
Use the matching header settings to put short content at the left, center, or right of the top of each page. For a bottom element, use the footer equivalents. The project’s settings reference documents the families of options, but the sources available here do not establish a complete, verified command invocation for every build. Do not assume a command copied from a different version will work unchanged.
Settings to look for
header.left,header.center, andheader.rightplace text across the header.- Header font name, font size, line, and spacing settings adjust its appearance and separation from page content.
- Use the corresponding
footer.*settings for the bottom of the page. header.htmlUrlpoints to an HTML document for a custom header; the settings reference says the same settings apply to footers.
See the project’s settings reference and HeaderFooter API reference.
What’s actually slowing this PC down?
Pick the symptom - the matching free tool is one click away.
Rank #2
- HTML CSS Design and Build Web Sites
- Comes with secure packaging
- It can be a gift option
Use HTML for a more controlled design
When positional text fields are too limited, create a separate HTML document for the header or footer and use the corresponding HTML URL setting. This lets you maintain markup for a more composed layout. The cited project documentation establishes the HTML-document option, but does not prescribe a particular markup pattern or guarantee identical rendering for every build; check the resulting PDF with your installed version.
Set margins and spacing to prevent collisions
Page margins and header/footer spacing are separate controls. The global page settings include margin.top and margin.bottom, while header/footer spacing controls the gap for those elements. The project cautions that excessive header spacing can place the header outside the PDF page and notes that increasing the top margin can correct that case.
Rank #3
If a header is missing or overlaps the body, reduce its spacing or increase the top margin, then inspect the PDF. Apply the analogous clearance check to a footer using the bottom margin and footer spacing, but verify the output rather than assuming every build behaves identically.
Add page numbers carefully
The global pageOffset setting adds a number to page numbers used in headers, footers, and the table of contents. The settings reference points to the manual for substitution sequences, but does not expose the complete token list here. Check wkhtmltopdf --help or the manual for your installed version before using page-number placeholders; token support and exact syntax should not be guessed.
Recommended Free Tools
Rank #4
- Brand: Wiley
- Set of 2 Volumes
- A handy two-book set that uniquely combines related technologies Highly visual format and accessible language makes these books highly effective learning tools Perfect for beginning web designers and front-end developers
Troubleshoot common problems
- Header or footer is absent: Confirm that the option is supported by your installed build, that you used the correct header or footer setting family, and that an HTML URL is reachable if you selected the HTML-document approach.
- Header is clipped or outside the page: The project specifically warns that excessive header spacing can push it off-page. Adjust spacing and, if needed, increase
margin.top; regenerate and inspect the PDF. - Body text overlaps a header or footer: Increase the corresponding page margin or reduce the header/footer spacing, then check the output pages for collisions.
- Page number does not render as expected: Verify the placeholder sequence against the manual for the installed version, and check whether
pageOffsetis changing the displayed numbering. - Options differ across machines: Compare the installed versions and use each version’s own help or manual rather than relying on an unverified invocation.
Version and security considerations
The wkhtmltopdf downloads page lists 0.12.6 as the stable series and gives June 11, 2020 as its release date. That is the project page’s stated release information, not evidence that every system has that version or that it is compatible with every current platform. Check the version and platform details relevant to your installation on the official downloads page.
The same project page warns: “Do not use wkhtmltopdf with any untrusted HTML – be sure to sanitize any user-supplied HTML/JS, otherwise it can lead to complete takeover of the server it is running on!” Treat HTML input and custom header/footer documents as security-sensitive when they contain user-supplied content.
Best Value
Or skip the browser setup
If your goal is to capture a website rather than generate a PDF with wkhtmltopdf, ScreenshotNeo offers a screenshot API and MCP server. One GET request can return a PNG, JPEG, WebP, or PDF; the API also supports page capture options such as PDF paper size, margins, and page ranges.
For example, this cURL request captures a URL as WebP:
Crashes, No Sound, or Screen Glitches?
Random freezes, missing sound and display glitches usually trace back to one bad driver. Find and replace yours safely.Free scan · under a minutePC Slower Than It Used to Be?
A free scan shows the junk files, broken settings and background clutter dragging Windows down - then fixes them in one click.Free scan · Windows 10 & 11curl -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 setup and options. Cookie and consent banners are accepted or removed before capture, along with known newsletter popups and chat widgets; each of those steps can be turned off. Bot checks, blank pages, timeouts, failed loads, and cache hits are not billed, and responses indicate the page verdict and billing status. Its MCP server gives AI agents screenshot tools. The free plan includes 1,000 shots a month without a card; paid plans start at $5 for 3,000 shots.
Sign up for 1,000 free screenshots a month, with no card required.
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.




