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.

Set landscape orientation with wkhtmltopdf by adding -O Landscape before the input and output paths:

wkhtmltopdf -O Landscape input.html output.pdf

The long option is --orientation Landscape. Orientation and paper size are separate settings, so choose a paper size explicitly if you need one other than the documented A4 default. The command-line syntax below follows the wkhtmltopdf project’s usage documentation, which identifies itself as version 0.12.6 with patched Qt (wkhtmltopdf command-line usage; reviewed September 29, 2026).

Set landscape orientation from the command line

Use the global orientation option before the page object (your input HTML file or URL) and the output PDF path:

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
wkhtmltopdf -O Landscape input.html output.pdf

The equivalent long form is:

wkhtmltopdf --orientation Landscape input.html output.pdf

-O is the short option, and the documented value is Landscape. The documented default is Portrait, so omitting the option leaves the document in portrait orientation unless another setting changes it. The usage synopsis is wkhtmltopdf [GLOBAL OPTION]... [OBJECT]... <output file>; putting the global option before the input makes its scope clear.

Render a local HTML file

Replace input.html with the path to your file and output.pdf with the destination filename. For paths containing spaces, quote each path so the shell passes it as one argument:

wkhtmltopdf --orientation Landscape "./reports/monthly report.html" "./output/monthly report.pdf"

The output directory must be an existing location your process can write to. If wkhtmltopdf reports that it cannot open the input or write the output, check the path and permissions before changing orientation settings.

Render a web page

A URL can be used in place of a local HTML input:

wkhtmltopdf --orientation Landscape https://example.com/page.html output.pdf

Use the actual URL you want to render. The command’s orientation option applies to the PDF output; it does not alter the source webpage itself.

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.

Choose the page size separately

Landscape controls orientation. The paper format is a separate setting, configured with --page-size. The documented default is A4; specify a named size such as A4 or Letter when the output must use that format:

wkhtmltopdf --orientation Landscape --page-size A4 input.html output.pdf
wkhtmltopdf --orientation Landscape --page-size Letter input.html output.pdf

The CLI reference documents page size independently from orientation, so do not expect selecting Landscape to select Letter or another paper format. Likewise, specifying a paper size alone does not request landscape orientation. The available named values depend on the installed program’s supported paper-size options; consult its help output if a requested value is rejected.

Use custom paper dimensions

For a nonstandard page, the command-line interface also provides --page-width and --page-height. The library settings reference likewise treats paper size and explicit dimensions as distinct from the orientation setting. Set dimensions when you need a custom format; set orientation when you want the named Landscape or Portrait mode. The official references do not establish a universal custom-dimension recipe for every wrapper or build, so check the syntax shown by your installed command before combining dimension options.

The wkhtmltopdf project’s command-line usage reference and libwkhtmltox PDF page settings document these as separate controls.

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.

Set orientation through libwkhtmltox

If your application integrates the wkhtmltopdf library instead of launching the command-line program, the PDF settings reference names the setting orientation, with the values Landscape and Portrait. Set that PDF setting in the configuration object your binding or wrapper uses; the exact syntax for assigning it depends on the language binding. The library documentation also exposes paper size and explicit page dimensions separately.

Do not assume that a wrapper’s property name or configuration format is identical to the CLI flag. Confirm that the wrapper maps its orientation option to libwkhtmltox’s PDF setting or passes the corresponding command-line option through. See the project’s PDF page settings reference.

Rank #4
Sale
Funny Coding I Know HTML How To Meet Ladies T-Shirt
  • Funny saying for any front-end developer, web developer, computer programmer, computer systems engineer, mobile app developer, software developer, or code lover who likes to code, make funny programming jokes, and take memorable photos.
  • Wear it proudly at International Programmers' Day, school, coding classes, or coding communities! It also makes a funny present for a computer programming lover friend.
  • Lightweight, Classic fit, Double-needle sleeve and bottom hem

Troubleshoot orientation that appears ineffective

Check option placement and spelling

Use -O Landscape or --orientation Landscape, with the value spelled as documented. Put the option among the global options before the input object and output path. Start with the minimal form below before adding other options:

wkhtmltopdf -O Landscape input.html output.pdf

Identify the installed build

Run:

wkhtmltopdf --version

Then inspect the installed package’s help output for the options it supports. The project usage page reviewed September 29, 2026 identifies its documented syntax as wkhtmltopdf 0.12.6 (with patched qt); that version line describes the documentation, not necessarily the binary installed on your system.

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

Builds can differ. For example, the Debian Bookworm man page notes that its package is compiled against Qt without wkhtmltopdf patches and lacks some features. That is a build-specific capability caveat, not evidence that the orientation option itself is missing. Check your actual package before concluding that a documented option behaves the same in every distribution build (Debian Bookworm wkhtmltopdf man page; reviewed September 29, 2026).

Best Value
I Know HTML How To Meet Ladies Funny Programming Language T-Shirt
  • Programming Language Lover Code Apparel. App or Web Design and Development Expert Funny Dress. Best Valentines Idea For Coding Lover. HTML Code or Meaning Costume
  • Funny I Know HTML - How To Meet Ladies Computer Programmer Quotes
  • Lightweight, Classic fit, Double-needle sleeve and bottom hem

Separate orientation from page-size problems

If the page is landscape but uses the wrong format, set --page-size explicitly. If the size is right but the orientation is not, verify that the orientation option is present and that your wrapper applies it to the PDF settings. These are independent controls in both the CLI reference and the library reference.

Check wrapper and distribution-specific behavior

When a command succeeds but the PDF does not reflect the requested setting, check the version, installed help, and wrapper configuration. A library binding or higher-level package can expose its own property name and may handle settings differently; the wrapper syntax is implementation-specific. Compare its configuration with the documented CLI or library setting rather than assuming that a similarly named option in another PDF renderer applies to wkhtmltopdf.

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

Or skip the browser setup

If your goal is to capture a webpage as an image or PDF rather than run wkhtmltopdf yourself, ScreenshotNeo offers a website screenshot API and MCP server. Its PDF options include paper size, margins, landscape orientation, and page ranges; consult the ScreenshotNeo documentation for the PDF request settings. The one-call example below captures a webpage as an image:

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
curl -G "https://api.screenshotneo.com/v1/shot" -d access_key=YOUR_API_KEY --data-urlencode url=https://example.com -o shot.webp
  • Cookie and consent banners are accepted before capture, and more than 60 known consent platforms, newsletter popups, and chat widgets can be removed; each step can be turned off.
  • Bot checks or CAPTCHAs, blank pages, timeouts, failed loads, and cache hits cost nothing. Responses include X-Page-Verdict and X-Billed headers indicating the outcome and billing status.
  • An MCP server provides take_screenshot, get_page_info, and capture_pdf tools for AI agents and other MCP clients.
  • The free plan includes 1,000 screenshots a month with no card; paid plans start at $5 for 3,000 screenshots.

Sign up for 1,000 free screenshots a month—no card required.

FAQ

Does setting orientation change the source HTML?

No. The documented option is a PDF setting, so it controls the generated document rather than editing the HTML input.

Should a wrapper use the exact CLI flag?

Not necessarily. Wrapper syntax is implementation-specific; check how it maps its setting to wkhtmltopdf or libwkhtmltox.

Quick Recap

Bestseller No. 2
SaleBestseller No. 4
Funny Coding I Know HTML How To Meet Ladies T-Shirt
Funny Coding I Know HTML How To Meet Ladies T-Shirt
Lightweight, Classic fit, Double-needle sleeve and bottom hem
$14.27
Bestseller No. 5
I Know HTML How To Meet Ladies Funny Programming Language T-Shirt
I Know HTML How To Meet Ladies Funny Programming Language T-Shirt
Funny I Know HTML - How To Meet Ladies Computer Programmer Quotes; Lightweight, Classic fit, Double-needle sleeve and bottom hem
$19.99

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.

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