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

Some links on this page are affiliate links: if you buy through them we may earn a commission, at no extra cost to you.

wkhtmltopdf does not print duplex pages itself. It converts HTML into a PDF. To produce physical two-sided pages, run wkhtmltopdf, then select two-sided or duplex in the print dialog or print system used by a printer that supports it. The wkhtmltopdf 0.12.6 (patched Qt) manual documents layout and PDF options, but no duplex-printing command-line switch.

What wkhtmltopdf can—and cannot—do

wkhtmltopdf is an open-source command-line renderer that uses the Qt WebKit engine to turn HTML into PDF (and, in the project’s wider toolset, images). Its job ends when the document file is written. Duplex is a physical printing decision made by the printer and its driver.

That division matters because options such as page size, orientation, margins, grayscale and copies affect the PDF, not which side of a sheet receives ink. In particular, --copies controls the number of copies represented in the output PDF; it is not a two-sided setting.

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

The instructions below follow the documented 0.12.6 manual. Linux distributions and other builds can differ, so an option absent from your installed wkhtmltopdf --help output should not be assumed to exist.

#1 Best Overall
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

Convert the HTML to a PDF

  1. Prepare a stable HTML source

    Save the document as a local file, such as input.html, or use an HTTP(S) URL that the conversion host can reach. Keep linked stylesheets, fonts and images available to the renderer.

  2. Run the basic conversion

    wkhtmltopdf input.html output.pdf

    The command writes output.pdf. The project’s basic usage pattern is the same when the input is a web address, for example wkhtmltopdf https://example.com output.pdf.

  3. Set layout before printing

    If the paper result will be A4 portrait, the documented defaults already match that combination. Otherwise set the relevant options explicitly:

    Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
    wkhtmltopdf --page-size Letter --orientation Landscape --margin-top 15mm --margin-right 15mm --margin-bottom 15mm --margin-left 15mm input.html output.pdf

    Use the units and option names accepted by your installed build. These switches change page geometry; none enables duplex.

  4. Open the finished PDF in your print workflow

    Use a PDF viewer, desktop print dialog or print system that can address the target printer. Select the printer, paper size and the two-sided/duplex setting, then choose the binding direction offered by that driver. The exact labels and available choices depend on the operating system, printer model and driver.

Layout options that affect a two-sided job

Duplex printing exposes alignment problems that may be hidden on single-sided pages. Check these PDF settings first:

Rank #2
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)
Option or setting What it changes What it does not change
--page-size Chooses a named paper size; A4 is the documented default. Does not turn on two-sided printing.
--orientation Chooses portrait or landscape; portrait is the documented default. Does not select a printer’s duplex mode.
Page dimensions and margins Control the printable layout and available space. Do not determine which sheet side is used.
Grayscale and print-media options Change rendering or color treatment where supported by the build. Do not configure physical paper handling.
--copies Controls the number of copies in the generated PDF. Is not a duplex control.

Match PDF geometry to loaded paper

A PDF set to Letter but printed on A4 (or the reverse) can introduce scaling, clipping or unexpected margins. Set the wkhtmltopdf page size to the stock actually loaded, then verify the print dialog is not silently replacing it with another size.

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

Keep front and back content predictable

Inspect page breaks, headers, footers and margins in the PDF viewer before sending it to the printer. A duplex printer cannot correct an HTML layout that already splits a heading, table or image across pages.

Choose automatic or manual duplex

Automatic duplex

If the selected printer and driver support automatic two-sided output, enable the duplex/two-sided checkbox or menu item in the print interface and submit the PDF. The printer handles sheet refeeding. Availability is device- and workflow-dependent; the option may disappear when a non-duplex printer, virtual printer or incompatible driver is selected.

Manual two-sided printing

Some printers require you to print one side, reload the pages and print the reverse side. Reload direction, page range and page order vary by model. There is no universal manual-duplex sequence established by the wkhtmltopdf documentation, so follow the printer’s own instructions. Test with a short document before committing a long run.

A reliable pre-print checklist

  • Confirm that output.pdf opens and contains the expected number of pages.
  • Check page size and orientation against the paper in the tray.
  • Look at pages with dense graphics, tables, headers and footers for clipping or overflow.
  • In the print dialog, select the actual duplex-capable printer rather than a PDF or image virtual printer.
  • Enable two-sided output only at the physical print step.
  • For manual duplex, consult the model instructions and run a small test first.

Troubleshooting

There is no duplex option in the wkhtmltopdf command

That is expected for the documented 0.12.6 command-line manual. Generate the PDF with wkhtmltopdf, then configure duplex in the print workflow.

What’s actually slowing this PC down?

Pick the symptom - the matching free tool is one click away.

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

The print dialog has no two-sided setting

Check the selected printer and driver. The hardware may not support automatic duplex, or the installed driver may not expose the feature. If the printer supports only manual duplex, use its documented reload procedure.

Rank #3
HP LaserJet M209d Laser Printer, Black and White, Automatic Duplex, Wired Connection Only (USB Cable Included), Best-for-Home Office (8J9L0F)
  • FROM AMERICA'S MOST TRUSTED PRINTER BRAND – Perfect for offices and small businesses printing black & white documents and reports.
  • KEY FEATURES – Fast print speeds, auto 2-sided printing, smart-guided buttons,150-sheet input tray and USB cable included.
  • BUILT FOR SPEED – Quickly finish multipage print projects with the fastest in-class two-sided printing speed.
  • AWARD-WINNING DESIGN – Save space without sacrificing performance with a compact design.
  • EXCEPTIONAL LASER QUALITY – Rely on consistent, quality prints page after page.

The back side is misaligned or the page is clipped

Compare the PDF’s --page-size, orientation and margins with the loaded paper and print-dialog settings. Correct the PDF geometry first; duplex merely places successive PDF pages on opposite sides of sheets.

Only one side prints

Verify that the duplex setting was enabled for this print job and that the selected device is the physical printer, not a virtual PDF destination. If the option is unavailable, the printer or driver may not support automatic duplex.

Manual duplex pages come out in the wrong order

Stop and consult the printer’s instructions before reprinting. Feed direction and required page ranges differ between models; wkhtmltopdf does not define that hardware procedure.

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

--copies did not create two-sided pages

--copies concerns the number of copies in the PDF. It cannot replace the printer’s duplex setting.

Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

Automation and operational notes

Treat conversion and printing as two separate stages in scripts: first create and validate the PDF, then hand it to the print system with duplex selected. This separation makes failures easier to diagnose and lets you archive the exact file that was sent to the printer.

Pin the wkhtmltopdf build used by a production job where possible, because distributions can package different versions or patches. Record explicit page size, orientation and margins instead of relying on defaults when the output must match a physical form. Keep a sample PDF and a one- or two-page test print for each printer model used by your team.

Rank #4
Sale
Brother HL-L2460DW Wireless Compact Monochrome Laser Printer with Duplex, Mobile Printing, Black & White Output | Includes Refresh Subscription Trial(1), (Renewed Premium - Refurbished)
  • 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

For large runs, verify the first few sheets before releasing the entire queue. A layout error is cheaper to fix in the PDF than after hundreds of sheets have been printed. Printer capacity, driver behavior and paper handling—not wkhtmltopdf—determine duplex throughput and failure recovery.

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

Or skip the browser setup

If your source is already available at a URL, ScreenshotNeo can capture it through one API call instead of requiring you to maintain browser-rendering setup. It returns a rendered image or PDF; you still choose duplex at the physical print step. Its PDF capture supports paper size, margins, landscape mode and page ranges.

See the ScreenshotNeo documentation for the current request options. The following runnable examples use the supplied API pattern (replace only the target URL and key):

cURL

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

Python

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

Node.js

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

ScreenshotNeo accepts the cookie or consent banner like a visitor and removes more than 60 known consent platforms, newsletter popups and chat widgets before capture; each cleanup step can be disabled. Bot checks or CAPTCHAs, blank pages, timeouts, failed loads and cache hits are not billed, and response headers identify the page verdict and billing result. An MCP server provides take_screenshot, get_page_info and capture_pdf tools for Claude, Cursor and other MCP clients.

There is a free allowance of 1,000 screenshots per month with no card. Paid plans start at $5 for 3,000 shots; every feature is included on every plan. When the PDF or capture is ready, print it with your printer’s duplex option.

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

Create a free ScreenshotNeo account to start with 1,000 screenshots a month and no card.

Frequently Asked Questions

Does this apply to every wkhtmltopdf build?

The documented behavior cited here is for the 0.12.6 manual with patched Qt. Packagers can ship different builds, so check the help and manual bundled with the version you installed.

Can a PDF viewer perform the duplex conversion?

No conversion is needed: wkhtmltopdf has already produced the PDF. A PDF viewer or print system only passes that file to a printer and exposes whatever two-sided controls the selected printer and driver provide.

The Bottom Line

Use wkhtmltopdf to create and format the PDF, then enable duplex in the printer’s own workflow. No documented wkhtmltopdf switch replaces that physical print setting.

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

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.