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.

Set every form control to its intended value before calling page.pdf(). Puppeteer then prints the page as rendered with Chromium’s print media type. Keep the controls visible in print CSS, wait for any application updates, and remember that the result is normally a static rendering—not an editable PDF form field.

What Puppeteer actually puts in the PDF

page.pdf() captures the rendered document after scripts and styles have been applied. Puppeteer uses the print CSS media type by default, so a control can look correct in a browser window yet be hidden, recolored, or rearranged in the PDF. The value must be present in the page’s current DOM state before printing.

A printed text box, checkbox, radio button, or select control is not automatically an interactive AcroForm field. If readers must type into the saved PDF, use a dedicated PDF form-authoring or post-processing step and test the resulting fields in the PDF readers your audience uses.

Complete Node.js example

Install Puppeteer, then adapt the URL and selectors to your form:

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
#1 Best Overall
Elebase USB to USB C Adapter for iPhone 18 Pro Max,USBC Car Charger Adapter
  • Read Before You Buy — No Video Output: These adapters support charging and USB 2.0 data transfer, but cannot transmit video signals. Except for standard USB webcams (which use USB data only), they are not compatible with HDMI/DisplayPort cables, video-capable USB-C hubs, or docking stations with video output.
  • Convert USB-A Ports to USB-C: Designed to connect USB-C earphones, cables, flash drives, card readers, and other USB-C accessories to standard USB-A ports. Plug-and-play with no drivers or software required.
  • Aluminum Alloy Housing: Built with a sturdy aluminum alloy shell that aids in heat dissipation and protects against daily wear and scratches. Designed to maintain a stable and secure connection.
  • Compact & Travel-Friendly: The ultra-compact design allows the adapter to stay plugged into your device without blocking adjacent ports or adding bulk, reducing wear and tear on your original USB ports.
  • 12-Month Warranty: Backed by a 12-month manufacturer warranty for peace of mind. Designed to meet strict quality control standards for reliable everyday performance.
npm install puppeteer
const puppeteer = require('puppeteer');

async function createPdf() {
  const browser = await puppeteer.launch();
  try {
    const page = await browser.newPage();
    await page.goto('https://example.com/form', {
      waitUntil: 'networkidle2'
    });

    await page.locator('input[name="name"]').fill('Ada Lovelace');
    await page.locator('textarea[name="notes"]').fill('Reviewed');
    await page.select('select[name="category"]', 'approved');

    // For checkboxes and radios, use the page’s actual interaction logic.
    await page.locator('input[name="terms"]').click();

    // Allow reactive frameworks, validation, or dependent fields to finish.
    await page.waitForNetworkIdle();

    await page.pdf({
      path: 'form.pdf',
      format: 'A4',
      printBackground: true,
      waitForFonts: true
    });
  } finally {
    await browser.close();
  }
}

createPdf().catch((error) => {
  console.error(error);
  process.exitCode = 1;
});

The documented locator and selection APIs are preferable to assigning an HTML property blindly because they can trigger the events your application uses. For a native select, page.select(selector, value) chooses the option whose value matches. For custom dropdowns, click the trigger and option just as a user would.

Set each control type correctly

Text, email, number, date, and search inputs

Use the locator for the input and call fill(). Date and number controls may enforce browser-specific formats or ranges; supply the format accepted by that page and verify the displayed result before printing.

await page.locator('input[name="email"]').fill('ada@example.test');
await page.locator('input[name="quantity"]').fill('3');
await page.locator('input[name="startDate"]').fill('2026-09-29');

Textareas

Fill the textarea rather than changing only a cached variable in your application:

await page.locator('textarea[name="comments"]').fill('Approved for publication.');

Select menus

await page.select('select[name="status"]', 'approved');

If the select is populated asynchronously, wait for the option first:

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
Rank #2
Anker USB-C Hub, 5-in-1 USB Hub for Laptops, 4K HDMI Multiport Adapter
  • 5-in-1 USB-C Hub: Experience comprehensive connectivity featuring a Power Delivery input, two USB-A 2.0 ports, a USB-A 3.0 port, and an HDMI port. (Note: The USB-C power delivery input port is only for connecting an external wall charger to power your laptop and cannot power peripheral devices.)
  • 90W Pass-Through Charging: Achieve optimal charging with 90W pass-through power to your laptop, supported by a total input of 100W, with the hub reserving 10W for operational efficiency. (Note: Wall charger not included.)
  • Quick Data Transfers: Accelerate your productivity with rapid data transfers using a high-speed 5Gbps USB 3.0 port and two 480Mbps USB 2.0 ports.
  • 4K HDMI Display: Enhance your visual experience with a hub capable of delivering 4K resolution at 30Hz in both mirror and extend modes. Please note that this hub is compatible with MacBook (macOS 12 and newer), Windows 10 and 11, ChromeOS, and laptops equipped with DP Alt Mode and Power Delivery. Note: This device is not compatible with Linux.
  • What You Get: Anker USB-C Hub (5-in-1, 4K HDMI), welcome guide, 18-month warranty, and our friendly customer service.
await page.locator('select[name="status"] option[value="approved"]')
  .wait();
await page.select('select[name="status"]', 'approved');

Checkboxes and radio buttons

Click the control or its associated label, then verify its state. Avoid clicking a checkbox that is already checked when your script may be retried; use an explicit state check:

const terms = page.locator('input[name="terms"]');
if (!(await terms.isChecked())) await terms.click();
await page.locator('input[name="delivery"][value="express"]').click();

Custom controls

Component libraries often render a button, listbox, or combobox instead of a native input. Follow the component’s visible interaction sequence and wait for the selected label or hidden value to update. A DOM assignment that bypasses the component’s events can leave the PDF showing an old value.

Make values visible in print CSS

Add print rules for anything hidden or unsuitable on paper. Also control page breaks and ensure long values wrap:

@media print {
  .no-print, nav, .chat-widget { display: none !important; }
  form, .form-section { break-inside: avoid; }
  input, textarea, select {
    color: #000;
    background: #fff;
    border: 1px solid #666;
    overflow-wrap: anywhere;
  }
  textarea { white-space: pre-wrap; }
}

@page {
  margin: 16mm;
}

When the screen design—not the print design—is required, call await page.emulateMediaType('screen') before page.pdf(). This does not make the PDF interactive; it only changes which media rules are applied. Chromium can also adjust colors for print. If exact colors matter, use -webkit-print-color-adjust: exact selectively and confirm the output in your deployment version.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
Rank #3
Sale
Anker USB C Hub, 7in1 Multi-Port USB Adapter, 4K@60Hz USBC to HDMI Splitter
  • Sleek 7-in-1 USB-C Hub: Features an HDMI port, two USB-A 3.0 ports, and a USB-C data port, each providing 5Gbps transfer speeds. It also includes a USB-C PD input port for charging up to 100W and dual SD and TF card slots, all in a compact design.
  • Flawless 4K@60Hz Video with HDMI: Delivers exceptional clarity and smoothness with its 4K@60Hz HDMI port, making it ideal for high-definition presentations and entertainment. (Note: Only the HDMI port supports video projection; the USB-C port is for data transfer only.)
  • Double Up on Efficiency: The two USB-A 3.0 ports and a USB-C port support a fast 5Gbps data rate, significantly boosting your transfer speeds and improving productivity.
  • Fast and Reliable 85W Charging: Offers high-capacity, speedy charging for laptops up to 85W, so you spend less time tethered to an outlet and more time being productive.
  • What You Get: Anker USB-C Hub (7-in-1), welcome guide, 18-month warranty, and our friendly customer service.

PDF options that affect form output

Option Use Important detail
format Choose a standard paper size such as A4 or letter. The current API reference lists letter as the default; specify the format to avoid regional surprises.
width, height Set custom page dimensions. Use with care when content depends on responsive breakpoints.
margin Reserve printable space. Large margins can force labels and controls onto extra pages.
preferCSSPageSize Honor your CSS @page size. Useful when the document defines its own paper dimensions.
scale Scale rendered content. Changing scale affects readability and pagination.
printBackground Include background colors and images. Its documented default is false; set true when fields rely on backgrounds.
waitForFonts Wait for fonts before capture. The documented default is true; retain it when text metrics affect wrapping.
tagged Request tagged PDF output. This is documented as experimental; validate accessibility with your target tools.

Reliable sequencing for dynamic forms

  1. Navigate or load HTML. Use waitUntil: 'networkidle2' as a starting point, but do not treat it as proof that application data is ready.
  2. Set controls. Fill, select, and click using the page’s real selectors.
  3. Wait for consequences. Wait for a result selector, a known request, a short delay, or network idle after dependent fields update.
  4. Check the rendered state. Read values with inputValue(), inspect checked state, and confirm visible selected text.
  5. Print once. Call page.pdf() after fonts and images needed by the form are ready.
  6. Always close Chromium. Put browser.close() in a finally block so failures do not leak processes.

For long pages, consider whether a full-page layout, explicit page breaks, or a different paper size produces a more usable document. Generate and inspect a PDF with the same Puppeteer and Chromium versions used in production; specialized controls can vary across releases, operating systems, and styles.

Why input values are missing

The script printed too early

Symptom: the PDF contains defaults or blank fields. Fix: wait for the selector or data request that proves the form update completed, then read the value before printing.

Print CSS hides the control

Symptom: values appear in a screenshot but not in the PDF. Fix: inspect @media print rules for display: none, visibility: hidden, opacity, print-only templates, and responsive breakpoints.

A controlled framework component ignored the change

Symptom: the DOM property changed, but a summary or validation message did not. Fix: use locator actions or dispatch the same user events as the component, then wait for its update.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
Rank #4
Sale
UGREEN USB to USB C Adapter Combo 4-Pack, 10Gbps USB C Converter Space Gray
  • Dual Converters, Infinite Potential:Includes 2× USB C male to USB A female adapters and 2× USB A male to USB C female adapters. Perfect for a wide range of uses—tablets with Bluetooth keyboards, expand USB ports on macbook, and more. Two different converters for all your daily needs
  • Next-Level 10Gbps & 3A Charging: No more slow 480Mbps, this usb to usb c adapter has a transfer speed of up to 10Gbps, allowing you to do more transferring in less time. This usb adapter fits both USB A and USB C charger, supporting up to 3A fast charging
  • Upgraded Exquisite Craftsmanship: With an aluminum alloy housing and metal connector, the usbc to usb adapter is extremely durable and sturdy. Rigorously tested to withstand more than 10,000 times of plugging and unplugging, ensuring long-lasting performance
  • Broad Compatible: The usb c to usb adapter widely supports all USB C/ USB A devices like laptops, tablets, cellphones, car chargers, and phone chargers. Such as compatible with MacBook Pro/Air 2023/2022, Thunderbolt 4/3 Devices,Apple MagSafe Watch 9/8/7/SE/Ultra, iPad Pro 2022/2021, Samsung Galaxy S23/S20/S10, and iPhone 17/16/15 Pro. Plug and play
  • Please Note: To reach 10Gbps speed, keep the cable under 3.3 ft. For USB A Male to USB C adapters, try flipping the USB C connector. USB C Male to USB A adapters support bidirectional 10Gbps transfer within 3.3 ft

The selector targets the wrong element

Symptom: no error, but another field remains unchanged. Fix: use unique names or test IDs, assert the locator count, and log the value immediately before printing.

Content is clipped or split

Symptom: labels overlap, long text is cut off, or a section breaks awkwardly. Fix: adjust margins, scale, line wrapping, break-inside, and page size; then inspect several representative values.

The PDF looks different from the browser

Symptom: colors, fonts, or spacing change. Fix: remember that print media is default, enable printBackground, wait for fonts, and use emulateMediaType('screen') only when screen styling is the intended design.

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

Snapshot PDF or fillable PDF?

Requirement Approach
Archive the values submitted by a user Set controls, render with Puppeteer, and store the static PDF.
Send a document that someone can type into later Create interactive PDF fields with a PDF form tool or post-processing library; Puppeteer alone is not that authoring step.
Preserve the web page’s exact screen appearance Use screen media deliberately, then validate pagination and accessibility.
Meet accessibility requirements Evaluate tagged output and the final PDF with an accessibility checker; the tagged option is experimental.

Or skip the browser setup

If you only need a rendered PDF or image of a URL, ScreenshotNeo provides a website screenshot API and MCP server. 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, CAPTCHAs, blank pages, timeouts, failed loads, and cache hits are not billed, and response headers report the page verdict and billing status. Its MCP tools—take_screenshot, get_page_info, and capture_pdf—work with Claude, Cursor, and other MCP clients.

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

For API parameters and PDF options, see the ScreenshotNeo documentation. A one-call Node.js request is:

Best Value
Anker USB C Hub, 5-in-1 USBC to HDMI Splitter with 4K Display
  • 5-in-1 Connectivity: Equipped with a 4K HDMI port, a 5 Gbps USB-C data port, two 5 Gbps USB-A ports, and a USB C 100W PD-IN port. Note: The USB C 100W PD-IN port supports only charging and does not support data transfer devices such as headphones or speakers.
  • Powerful Pass-Through Charging: Supports up to 85W pass-through charging so you can power up your laptop while you use the hub. Note: Pass-through charging requires a charger (not included). Note: To achieve full power for iPad, we recommend using a 45W wall charger.
  • Transfer Files in Seconds: Move files to and from your laptop at speeds of up to 5 Gbps via the USB-C and USB-A data ports. Note: The USB C 5Gbps Data port does not support video output.
  • HD Display: Connect to the HDMI port to stream or mirror content to an external monitor in resolutions of up to 4K@30Hz. Note: The USB-C ports do not support video output.
  • What You Get: Anker 332 USB-C Hub (5-in-1), welcome guide, our worry-free 18-month warranty, and friendly customer service.
const q = new URLSearchParams({ access_key: 'YOUR_API_KEY', url: 'https://stripe.com' });
const res = await fetch(`https://api.screenshotneo.com/v1/shot?${q}`);
const buffer = Buffer.from(await res.arrayBuffer());
require('fs').writeFileSync('shot.webp', buffer);

Equivalent requests:

curl -G "https://api.screenshotneo.com/v1/shot" -d access_key=YOUR_API_KEY --data-urlencode url=https://stripe.com -o shot.webp
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)

Every plan includes the features: full-page and element capture, device and retina settings, PDF paper and margin controls, custom CSS and JavaScript, waits, request blocking, cookies and headers, geolocation, caching, signed links, asynchronous webhooks, bulk capture, and a usage API. The Free plan includes 1,000 shots per month with no card; paid plans start at $5 for 3,000 shots. Create a free ScreenshotNeo account.

Frequently Asked Questions

Does Puppeteer preserve an input’s value attribute automatically?

The PDF reflects the control’s rendered current state. Set the live value before printing; changing only the original HTML attribute is not a reliable substitute.

Can I make the generated PDF editable with page.pdf()?

No. page.pdf() prints the page. Add a separate PDF form-authoring or post-processing stage when interactive fields are required.

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

Should I use networkidle0 or networkidle2?

Either can be a starting point, but neither proves that your form’s data and UI updates are complete. Wait for an application-specific selector or event as well.

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.