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.

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

For HTML that depends on browser layout, CSS, or JavaScript, convert it to PDF on AWS Lambda by launching a Lambda-compatible Chromium build with Puppeteer, loading the page, and calling page.pdf(). The key deployment challenge is packaging a Chromium binary and its Linux libraries that match your Lambda runtime, architecture, and Puppeteer version. Puppeteer uses print CSS by default; select screen media explicitly if that is what the document needs.

When to use a browser to make a PDF

A headless browser is a practical fit when the source is a webpage or HTML document whose layout depends on browser CSS, fonts, or JavaScript. Puppeteer controls Chromium from Node.js and returns PDF bytes from page.pdf(). You can navigate to a URL or set the page content directly, then return those bytes from the Lambda invocation or store them in an object store according to your application’s design.

This is not the only possible way to create a PDF: simpler, static documents may not need a full browser. This approach is specifically for cases where browser rendering is part of the desired result.

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

Choose how to package Chromium for Lambda

A standard desktop Puppeteer setup is not enough by itself. Lambda runs Linux, so the Chromium executable and its required libraries must be compatible with the function’s runtime and CPU architecture. AWS supports ZIP deployment packages and container images; select the format based on how you need to manage the browser stack.

#1 Best Overall
PDF Converter Ultimate - Convert PDF files into Word, Excel, PowerPoint and others - PDF converter software with OCR recognition compatible with Windows 11 / 10 / 8.1 / 8 / 7
  • Convert your PDF files into Word, Excel & Co. the easy way
  • Convert scanned documents thanks to our new 2022 OCR technology
  • Adjustable conversion settings
  • No subscription! Lifetime license!
  • Compatible with Windows 11, 10, 8.1, 7 - Internet connection required
Deployment format When it fits What to plan for
ZIP package, optionally with layers Use when the browser binary, libraries, and application dependencies fit the package constraints. Include compatible Linux dependencies in the function package or layer. AWS allows up to five layers, and the combined unzipped function and layer content cannot exceed 250 MB. Build native and binary dependencies for the Lambda environment and selected architecture.
Container image Consider it when the browser and system dependencies are difficult to manage within a ZIP package, or when you want more control over the operating-system environment. Use an AWS Lambda base image where it meets your needs, or ensure a non-AWS base image includes the Node.js runtime interface client. Build and test the actual image that will be deployed.

AWS’s current Node.js container-image guide lists Node.js 26, 24, and 22 base-image tags; Node.js 20 and later images use Amazon Linux 2023. Runtime availability and supported tags can change, so confirm the current AWS guidance for the runtime you select. For ZIP deployments, AWS specifies Linux-compatible layer content and recognized Node.js paths such as nodejs/node_modules. Measure the final unzipped artifact rather than assuming a browser package will fit.

Match the Chromium and Puppeteer versions

Choose a serverless-compatible Chromium distribution, then check its release guidance for compatible Puppeteer versions and supported architectures. The Sparticuz Chromium project documents use on serverless platforms including Lambda and points to Puppeteer’s Chromium support information. Its exact release compatibility can change; pin versions together and validate the specific pair you deploy.

Do not assume that a package is suitable merely because its README describes Lambda support, or because a version appears in another AWS feature. For example, AWS CloudWatch Synthetics documents a Node.js 20 runtime pairing with Puppeteer-core 22.10.0 and Chromium 125.0.6422.112; those are Synthetics runtime details, not a ready-made browser stack for an arbitrary Lambda function. The older chrome-aws-lambda npm package page says it was published five years ago, so verify its current compatibility independently before choosing it.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
Rank #2
Tengchi RCA to HDMI Converter, AV to HDMI Adapter
  • RCA Female to HDMI Video Converters Adapter : The cable is used to convert analog composite input to HDMI 1080p output, displayed on a 1080p HD TV/TV/monitor.
  • Input ports: 1xRCA Female (Yellow, White, Red), Output ports: 1xHDMI 1.3 1080p. NOT support 3D and 4K, NOT support HDMI Converts to AV
  • AV to HDMI Converter: Plug and Play, Easy to Install and Operate, Powered by External USB Cable. Note: Please hook up the USB power cable (included) to 5V 1Apower source during use (not included power supply ).
  • Support PAL, NTSC3.58, NTSC4.43, SECAM, PAL/M, PAL/N standard TV formats input. For PS2,PS3,Xbox,N64,STB, VHS, VCR, DVD Players and other devices with standard composite AV input.
  • You Will Get : 1x RCA Female TO HDMI Converter, 1xHDMI cable, 1xUSB cable, 1xUser Manual. ONE YEAR WARRANTY - if you are not satisfied for any reason whatsoever, do not hesitate to contact us .

Implement the PDF conversion handler

The handler below assumes you have deployed puppeteer-core and a compatible Chromium executable, and that BROWSER_EXECUTABLE_PATH points to that executable. Chromium launch arguments are distribution-specific: use the arguments documented by the Chromium package you selected, rather than copying flags from an unrelated package or local machine.

const puppeteer = require('puppeteer-core');

exports.handler = async (event) => {
  const url = event?.url;
  if (typeof url !== 'string' || !/^https?:///i.test(url)) {
    return {
      statusCode: 400,
      headers: { 'content-type': 'application/json' },
      body: JSON.stringify({ error: 'Provide an http or https URL.' })
    };
  }

  let browser;
  try {
    browser = await puppeteer.launch({
      executablePath: process.env.BROWSER_EXECUTABLE_PATH,
      headless: true,
      args: [/* Insert the selected Chromium package's Lambda arguments. */]
    });

    const page = await browser.newPage();
    await page.goto(url, { waitUntil: 'networkidle0', timeout: 30000 });

    // Optional: use screen CSS instead of the default print CSS.
    // await page.emulateMediaType('screen');

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

    return {
      statusCode: 200,
      headers: { 'content-type': 'application/pdf' },
      isBase64Encoded: true,
      body: pdf.toString('base64')
    };
  } finally {
    if (browser) await browser.close();
  }
};

The response shown is suitable for an integration that expects a base64-encoded binary body. If your invocation path has a response-size limit or the PDF is large, store the bytes in object storage and return a reference instead. That storage and delivery design depends on your application; the browser conversion itself only produces the PDF bytes.

Load HTML you already have

If the function receives HTML rather than a URL, replace the navigation line with await page.setContent(html, { waitUntil: 'networkidle0' }). Validate and constrain untrusted HTML: scripts and external resources can execute or trigger network requests during rendering. For URL input, validate allowed schemes and consider which hosts the function is permitted to reach. These are application security controls; a browser package alone does not provide a complete isolation policy.

Rank #3
Audio Converter - Edit and convert your sound and music files to other audio formats - easy audio editing software - compatible with Windows 10, 8 and 7
  • AUDIO ALL-ROUNDER – convert your audio or video files into almost any audio format - edit, trim, merge, adjust sample and bit rate, extract audio from videos
  • Supported input formats - MP3, MP2, AAC, AC3, WAV, WMA, M4A, RM, RAM, OGG, AU, AIF, AIFF, PG, MPEG, MPEG 2, MP4, M4V, MJPG, MJPEG, HD TS, HD MTS, HD M2TS, HD MPG, HD MPEG, HD MP4, HD WMV, QuickTime HD MOV and others
  • Supported output formats - AAC, AC3, AIFF, AMR, AU, FLAC, M4A, MKA, MP2, MP3, OGG, WAV, WMA
  • EASY TO INSTALL AND USE - user-friendly and intuitive interface, free tech support whenever you need assistance
  • compatible with Windows 10, 8 and 7 (32 and 64-bit versions) - single user license

Choose print or screen styling deliberately

page.pdf() renders using the print CSS media type. That is often right for a document intended to be printed, but it can activate print-specific styles and hide or rearrange screen content. To render with screen media, call await page.emulateMediaType('screen') before page.pdf(). Puppeteer’s API documentation states: “To generate a PDF with the screen media type, call page.emulateMediaType('screen') before calling page.pdf().”

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

PDF generation also modifies colors for printing by default. If exact color reproduction matters, the page’s CSS can use -webkit-print-color-adjust. Confirm the result against representative pages: media selection, page dimensions, margins, background printing, and CSS page-size rules all affect layout.

Set PDF options for the document

The example uses A4 paper, enables printed backgrounds, and gives CSS page-size declarations priority. Adapt these to the content rather than treating them as universal settings.

Rank #4
3.3 Feet VHS to Digital Converter, Type-C/USB 2.0 Video Cpture Card
  • RCA to USB Converter: This USB Capture Device can convert anolog RCA composite input into high-definition USB output, the maximum output resolution can reach 1920x1080@30Hz, suitable for camcorders, set-top boxes, boxes, DV camcorders, DVD, VHS, VCD, VCR, DVR and other devices. (Note: Only compatible with NTSC/PAL formats)
  • USB2.0 Video Capture: Supports RCA and S-Video input, USB 2.0/Type-C capture, the RCA to USB Capture Card is compatible with most current laptops, ensuring stable video capture and transmission.
  • 3.3ft/1m USB Cable: avedio links USB2.0 capture card is equipped with 3.3 feet USB capture cable, reduce the use of troubles caused by short cables and improve operational flexibility.
  • Wide Compatibility: Compatible with Windows and MacOS operating systems and supporting video capture software such as OBS, Potplayer, etc., this RCA to USB Capture Card is ideal for video production, screen recording and other scenarios.
  • Packing List: RCA&S-Video to USB Capture Card*1, USB A to Type-C converter*1, CD*1, 5ft S-Video Cable*1, RCA Converter*1, User Manual*1.
  • Paper size and CSS sizing: Select a paper size or let page CSS define dimensions, and decide whether CSS page size should take precedence.
  • Margins: Set margins when headers, footers, or printable edges need specific spacing. Check that margins do not clip page content.
  • Backgrounds and colors: Enable background printing when the design relies on colored blocks or background images. Use print color-adjust CSS when exact colors matter.
  • Page ranges and orientation: Use the PDF options appropriate to the requested pages and portrait or landscape layout. Verify page numbering and breaks with long documents.

Build and validate the deployed artifact

  1. Pin the stack: Record the Lambda Node.js runtime, CPU architecture, Puppeteer version, Chromium package version, and package or image build. Update them as a compatible set.
  2. Build for Lambda Linux: Package native modules and browser libraries for the selected Amazon Linux-compatible runtime and architecture. AWS recommends a Linux-compatible build environment; Docker is one option.
  3. Check package limits: For ZIP deployments, include the function and layers in your unzipped-size calculation and keep the total within 250 MB. Move to a container image if that packaging constraint or dependency management is a poor fit.
  4. Test the real artifact: For container workflows, AWS base images include the runtime interface client and runtime interface emulator, enabling local invocation workflows. Test the built image or ZIP in an environment that matches Lambda; a browser working on a developer’s desktop does not establish that its binary or libraries will run in Lambda.
  5. Exercise representative documents: Try the largest expected page, external fonts and images, print and screen styling where relevant, and a page with slow or unavailable resources. Set function timeout and memory based on observed behavior for your own workload; no single setting is established for all documents.
Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

Troubleshoot common failures

  • Chromium cannot launch or reports a missing shared library: The binary or one of its Linux dependencies is absent or incompatible. Rebuild for Lambda’s Linux environment and selected architecture, and ensure the libraries are in the deployed package or image.
  • It works locally but not in Lambda: Local Chromium, operating-system libraries, architecture, or package paths may differ. Confirm the deployed executable path and test the actual Lambda-targeted artifact rather than relying on desktop success.
  • PDF appearance differs from the webpage: Puppeteer uses print CSS unless screen media is selected. Check print-specific CSS, page-size rules, margins, background printing, and color adjustment.
  • Navigation times out: The page may have slow requests or persistent network activity. Review the URL and resource behavior, choose a load condition that fits the page, and set a timeout appropriate to the workload. A timeout is not evidence that the page is safe to treat as an empty document.
  • ZIP deployment is rejected or too large: Check the combined unzipped package and layer content against the 250 MB limit. Remove unnecessary dependencies or use a Lambda container image.
  • Images or fonts are missing: Confirm the page can reach those resources from the Lambda network environment and that rendering waits long enough for them to load. If content is supplied as HTML, check whether its asset URLs are accessible from the function.
  • Invocation response is too large: Return the PDF through an object-storage workflow rather than embedding a large base64 body in the invocation response.

Performance, reliability, and cost considerations

Browser startup, page complexity, network dependencies, and document length all influence conversion time and resource use. The available technical guidance does not establish a universal Lambda memory size, timeout, throughput, or per-document cost for this workload. Measure your own pages, set limits that match the expected workload, and monitor timeouts and failures. Reuse of a browser across warm invocations may be an optimization in some designs, but it requires careful lifecycle and concurrency handling; the simpler example launches and closes a browser per invocation.

Rendering user-provided URLs also creates network and resource-consumption risks. Apply host and scheme allow-lists where appropriate, limit input size and execution time, and avoid treating unrestricted browser navigation as a security boundary.

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

Or skip the browser setup

If the job is to capture a rendered webpage rather than implement your own Lambda conversion pipeline, ScreenshotNeo offers a website screenshot API that can return PNG, JPEG, WebP, or PDF. For example, this one-call request captures a URL; consult the ScreenshotNeo API documentation for its PDF-specific settings.

Best Value
Roxio Easy VHS to DVD 3 Plus | VHS, Hi8, V8 Video to DVD or Digital Converter | Amazon Exclusive 2 Bonus DVDs [Windows Disc]
  • Convert your VHS tapes to DVD or digital to enhance and preserve your home movies
  • Capture analog video directly from your camcorder or VCR and burn to DVD or convert to popular digital formats to share freely across devices
  • Trim video, make quick edits, enhance color, add transitions, reduce noise and stabilize old footage to breathe new life into your old videos
  • Complete your video experience by selecting from creative, customizable DVD menu templates, or creating personalized disc labels
  • Get 2 DVDs for your first projects: An Amazon exclusive extra
curl -G "https://api.screenshotneo.com/v1/shot" -d access_key=YOUR_API_KEY --data-urlencode url=https://stripe.com -o shot.webp

ScreenshotNeo accepts cookie or consent banners before capture and removes more than 60 known consent platforms, newsletter popups, and chat widgets; each step can be turned off. Bot checks, blank pages, timeouts, failed loads, and cache hits are not billed, with response headers indicating the page verdict and billing status. Its MCP server provides screenshot tools for AI agents, and the Free plan includes 1,000 screenshots a month without a card; paid plans start at $5 for 3,000. Sign up for the free plan.

Frequently Asked Questions

Can I use a Lambda layer for Chromium?

Yes, provided its Linux-compatible browser files and libraries work with the function’s runtime and architecture, and the combined unzipped function and layers remain within AWS’s 250 MB limit.

Does Puppeteer make a PDF using screen CSS by default?

No. PDF generation uses print media by default. Call page.emulateMediaType('screen') before page.pdf() when you need screen media.

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

Quick Recap

Bestseller No. 1
PDF Converter Ultimate - Convert PDF files into Word, Excel, PowerPoint and others - PDF converter software with OCR recognition compatible with Windows 11 / 10 / 8.1 / 8 / 7
PDF Converter Ultimate - Convert PDF files into Word, Excel, PowerPoint and others - PDF converter software with OCR recognition compatible with Windows 11 / 10 / 8.1 / 8 / 7
Convert your PDF files into Word, Excel & Co. the easy way; Convert scanned documents thanks to our new 2022 OCR technology
$29.99
Bestseller No. 3
Bestseller No. 5
Roxio Easy VHS to DVD 3 Plus | VHS, Hi8, V8 Video to DVD or Digital Converter | Amazon Exclusive 2 Bonus DVDs [Windows Disc]
Roxio Easy VHS to DVD 3 Plus | VHS, Hi8, V8 Video to DVD or Digital Converter | Amazon Exclusive 2 Bonus DVDs [Windows Disc]
Convert your VHS tapes to DVD or digital to enhance and preserve your home movies; Get 2 DVDs for your first projects: An Amazon exclusive extra
$51.84

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.