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.

page.pdf({ landscape: true }) makes the generated PDF landscape as a whole; Puppeteer does not provide a built-in list of page numbers whose orientation should change. For a wide section you can identify before pagination, try CSS named pages and force that section onto its own page or pages. Set preferCSSPageSize: true so CSS page sizes take precedence, then verify the actual PDF produced by the Chrome or Chromium build you deploy. If you need to target final output page numbers reliably, render portrait and landscape sections separately and merge the PDFs in order.

Choose the method based on what “selected pages” means

The right approach depends on whether you can identify the content that needs a different orientation before the browser paginates the document, or whether the requirement names final PDF page numbers.

Requirement Starting approach Main qualification
A known content section, such as a wide table, should be landscape Use CSS @page rules with a named page and assign the section to it. Support for named pages and page styling must be checked in the deployed Chromium build.
Specific final output pages, such as pages 3 and 7, must be landscape Render sections separately with the desired settings, then merge the PDFs in order. Final page numbering can shift when content or layout changes; validate the merged file.
Only a range of pages should be included in the output Use Puppeteer’s pageRanges option. This selects pages for inclusion; it does not set their individual orientations.

CSS is the natural first choice when the content itself determines the layout. Separate rendering and merging is the more controllable pipeline when the requirement is tied to final page numbers or CSS behavior cannot be relied on in your renderer.

Use CSS named pages for a known landscape section

Give the wide content a named page style, and place it on a page boundary so it does not share a page with ordinary portrait content. For example, the following rules specify A4 portrait pages by default and A4 landscape pages for an element with the wide-section class:

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
#1 Best Overall
Sale
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
@page {
  size: A4 portrait;
  margin: 15mm;
}

@page wide {
  size: A4 landscape;
  margin: 12mm;
}

.wide-section {
  page: wide;
  break-before: page;
  break-after: page;
}

Apply wide-section to the block containing the wide table or other content that should use landscape pages. The forced breaks are intended to keep the section separate from the surrounding content; they do not assign a particular final PDF page number to it. If the section spans multiple pages, those pages use the section’s named page style where the renderer supports it.

Generate the PDF with CSS page sizing preferred:

const pdf = await page.pdf({
  format: 'A4',
  preferCSSPageSize: true,
});

preferCSSPageSize tells Puppeteer to give CSS @page size precedence over PDF paper-size options such as format, width, or height. Its documented default is false, in which case content is scaled to fit the paper size. It does not enable page selectors or otherwise choose which pages are landscape.

Check the browser’s print layout

Page.pdf() uses the print CSS media type. If your document’s rules are written for screen media and you deliberately need those styles for capture, Puppeteer documents emulating the screen media type before calling page.pdf(). Otherwise, inspect the print layout: a rule that appears correct in a normal browser window may not be the layout used for the PDF.

Render with the exact Puppeteer package and Chrome or Chromium build used in production. Confirm that the intended section has the expected page dimensions and orientation, that the rest of the document remains portrait, and that margins, headers, footers, and page breaks are acceptable. CSS paged-media standards describe named page styles, but standards descriptions alone do not establish that a specific browser build implements every feature.

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

Why page numbers are different from named content

A named page is tied to an element or section that you can identify in the HTML before pagination. “Make final page 3 landscape” is a different request: page 3 only exists after the browser has flowed text and laid out the document. Changing a font, margin, paper size, or earlier content can move a table or section onto another page.

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⁴

W3C CSS Paged Media Level 3 draft material describes an @page :nth() page selector. That draft description is not proof that the specific Chromium version behind Puppeteer supports the selector. Do not rely on a page-number selector in production without testing the deployed renderer’s output.

What Puppeteer’s PDF options do—and do not do

  • landscape is a Boolean option for printing in landscape. It applies to the generated document; it is not a per-page orientation map.
  • pageRanges controls which document pages are included in the output. It can select ranges such as 1-5, 8, 11-13, but does not change the orientation of those pages.
  • preferCSSPageSize controls whether CSS @page sizing takes precedence over PDF paper-size options. It is not a page-selection switch.
  • Page.pdf() prints using print CSS. Screen-media emulation is a separate choice if you need screen styles instead.

These options solve different problems. Combining pageRanges with landscape: true still does not produce a document in which only the selected range is landscape: the range is selected, while the landscape setting applies to the generated output.

Use separate PDFs when final page numbers must be exact

For page-number requirements, or when mixed page dimensions must be dependable across renderer versions, split the document into portrait and landscape sections. Render each section with the appropriate PDF settings, then merge the resulting pages in the required order with a PDF-processing library suitable for your application. No particular merger is required by Puppeteer’s PDF options.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
  1. Define the final sequence. Decide which content belongs in each portrait or landscape segment and where each segment belongs in the finished document.
  2. Render each segment independently. Use portrait settings for portrait sections and landscape: true for landscape sections. Keep the segment boundaries under your control rather than relying on a later page number to stay fixed.
  3. Merge the files in sequence. Insert the pages in the order required by the final document.
  4. Inspect the combined PDF. Check page order, page dimensions, orientation, margins, and headers or footers. Validate the final combined file, not just the intermediate PDFs.

This method adds a merge step and makes the document pipeline more involved, but it avoids depending on an unverified page-number selector in the browser. It is also appropriate when pages need mixed dimensions, not just portrait and landscape versions of the same paper size.

Test and troubleshoot the generated PDF

The entire PDF is landscape

Check whether landscape: true is being applied to the whole page.pdf() call. That option is document-level. For content-driven mixed orientation, use tested CSS page styling; for exact final page numbers, render and merge separate segments.

Rank #3
HP Smart Tank 5000 Ink Tank Printer | 2 Years of Ink Included | All-in-One
  • 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.

The wide section is still portrait or is scaled down

Confirm that the section is assigned to the named page in the print layout, that your deployed Chromium build supports the CSS features used, and that preferCSSPageSize: true is set. Then inspect the output page dimensions. If the renderer does not produce the required result consistently, use separate rendering and merging.

The landscape section starts on an unexpected page

Named page styling follows content, not a guaranteed output-page number. Text flow, fonts, margins, and paper size can change pagination. Use the forced breaks as layout boundaries, and recheck the final PDF whenever those inputs change. If a numbered output page must have a specific orientation, control the segments and merge them.

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

Some CSS rules appear to be ignored

Remember that Page.pdf() uses print CSS. Check for rules inside media queries that only apply to screen, and confirm the Puppeteer and browser versions in the deployed environment. Screen-media emulation is an option only if screen styles are what you intend to print.

The output contains the wrong pages

Review the pageRanges value and distinguish page selection from page orientation. It limits which pages are included; it does not make a selected page landscape. When merging intermediate files, verify the sequence and contents of every segment in the combined PDF.

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 you need a clean capture of a page rather than a custom mixed-orientation PDF, ScreenshotNeo can return a screenshot or PDF from one GET request. Its PDF options do not establish a per-output-page orientation map, so use Puppeteer and the approaches above when a PDF must mix portrait and landscape pages.

Rank #4
Sale
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

Example request, following the ScreenshotNeo API documentation:

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.
curl -G "https://api.screenshotneo.com/v1/shot" -d access_key=YOUR_API_KEY --data-urlencode url=https://stripe.com -o shot.webp
  • Before capture, it accepts cookie or consent banners and removes more than 60 known consent platforms, newsletter popups, and chat widgets; each step can be turned off.
  • Bot checks or CAPTCHAs, blank pages, timeouts, failed loads, and cache hits are not billed; response headers report the page verdict and billing status.
  • An MCP server provides take_screenshot, get_page_info, and capture_pdf tools for AI agents and MCP clients.
  • The free plan includes 1,000 shots per month with no card; paid plans start at $5 for 3,000 shots.

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

Frequently Asked Questions

Can Puppeteer set landscape orientation for page 3 only?

Not with a built-in page-number-to-orientation option. Use tested CSS for a section identified by content, or render and merge PDFs if the requirement is tied to final page numbers.

Does preferCSSPageSize make @page :nth() work?

No. It controls whether CSS page size takes precedence over PDF paper-size options; it does not activate or guarantee support for a page selector.

Will the named-page CSS work in every Puppeteer installation?

Do not assume so. Test the generated PDF using the Chrome or Chromium build paired with the Puppeteer version you deploy.

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

Quick Recap

Bestseller No. 3
HP Smart Tank 5000 Ink Tank Printer | 2 Years of Ink Included | All-in-One
HP Smart Tank 5000 Ink Tank Printer | 2 Years of Ink Included | All-in-One
PREMIUM SUPPORT - Strong technical expertise to solve issues faster; THE LAST PRINTER YOU'LL EVER NEED. Enjoy years of refillable, cartridge-free printing.
$194.03

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.