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.

If images disappear from a Puppeteer PDF, wait for the actual image requests to finish and check that each image loaded successfully before calling page.pdf(). An element appearing in the DOM, or the page reaching network idle, is not proof that its image has loaded, decoded, or been drawn. Then diagnose the image’s source and rendering method: a remote <img>, a local file, a lazy-loaded image, a CSS background, and canvas content need different fixes.

Start by checking image state before printing

Run a diagnostic immediately before page.pdf(). For each expected image, inspect currentSrc (the URL the browser selected), complete, naturalWidth, and naturalHeight. A nonzero natural width is a useful indication that an <img> loaded; complete alone is not enough, because it can also be true after a failed request.

The following helper waits for each current document image to either load or error, with a timeout so a stalled request cannot hang the PDF job indefinitely. It returns failures instead of treating them as successful loads.

async function inspectImages(page, timeoutMs = 15000) {
  return page.evaluate(async (timeout) => {
    const images = [...document.images];

    await Promise.all(images.map((img) => {
      if (img.complete) return Promise.resolve();

      return new Promise((resolve) => {
        let timer;
        const finish = () => {
          clearTimeout(timer);
          img.removeEventListener('load', finish);
          img.removeEventListener('error', finish);
          resolve();
        };
        img.addEventListener('load', finish, { once: true });
        img.addEventListener('error', finish, { once: true });
        timer = setTimeout(finish, timeout);
      });
    }));

    return images.map((img) => ({
      src: img.currentSrc || img.src,
      complete: img.complete,
      loaded: img.naturalWidth > 0,
      width: img.naturalWidth,
      height: img.naturalHeight,
    }));
  }, timeoutMs);
}

Use it before generating the PDF, and log or fail the job when an expected image has loaded: false:

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
#1 Best Overall
Sale
Liene M100 4x6'' Photo Printer, Phone Printer 100 Sheets & 3 Cartridges, Full-Color Photo, Portable Instant Photo Printer for iPhone Android, Thermal Dye Sublimation, Wi-Fi Picture Printer 100 Papers
  • User-Friendly Portable Photo Printer for iPhone, Android & PC - Get beautiful and colourful memories with Liene 4x6 photo printer! After opening the entire package, you can find one cartridge + 20 sheets of photo paper (placed inside the machine packaging), as well as an additional box containing 80 sheets of photo paper (which includes two cartridges + 80 sheets of photo paper). Full package includes smartphone photo printer, Liene 4x6 photo printer papers (100 sheets), 3 colour cartridges, and fully sealed cassette to prevent dust. Minimalist and magnetic design for compact storage.
  • Superior Quality 4x6 Photo Printer - Print photos like no other thanks to the thermal-dye sublimation tech adopted by the picture printer for iphone. The dyes deeply penetrate the paper for vibrant photo printing, and the laminated surface is resistant to water, scratches, fingerprints and fading. Clean the print head promptly if smudges are observed on printed photos during operation. Get Liene photo printers now for yourself and your loved ones, print your happy moments together and keep your love forever!
  • Wi-Fi Photo Printer for Smartphone - The built-in hotspot of the photo printer makes it easy to print pictures from your phone, avoiding outside interference with a fast and stable connection. No other networks required! Simply connect your device to the independent instant photo printer 4x6 hotspot.
  • Multiple Device Compatibility - Liene phone printer provides instant photo printing for up to 5 simultaneous connections. Share with family and friends or print from your different devices. No additional cables or Bluetooth required when printing photos with this picture printer. Note: Ensure the ink cartridge clicks into place before printing.
  • Customize your Printing with the Liene App - Customize your photos with our specialized App! You can add a Square border, insert filters, enhance the contrast and brightness, check printing status, and more. You can even print your ID and Visa photos from home with this photo printer for iphone 4x6 prints.
const imageResults = await inspectImages(page);
const failedImages = imageResults.filter((image) => !image.loaded);

if (failedImages.length) {
  console.error('Images missing before PDF:', failedImages);
  // Decide whether to retry, fail the export, or continue with a warning.
}

await page.pdf({ path: 'output.pdf', printBackground: true });

This check covers ordinary document <img> elements that have already been triggered. It does not cause lazy images to load, wait for canvas drawing, or establish that a CSS background image succeeded. Add the application-specific readiness condition for those cases.

Use a bounded wait, not just a selector or network idle

page.waitForSelector('img') confirms that an element exists, not that its image request succeeded. Likewise, networkidle0 or networkidle2 can be useful navigation conditions, but neither is a universal image-readiness signal. Pages may defer image requests, keep requests active for unrelated reasons, or finish a request before application code has completed its rendering.

Puppeteer’s documented PDF flow includes navigating with waitUntil: 'networkidle2' and then calling page.pdf(). Use that as one part of a readiness strategy, not as the only check on an image-heavy page. The Puppeteer guide identifies Page.pdf() as its API for printing a page to PDF and documents that it waits for fonts by default. The PDF option waitForFonts concerns document.fonts.ready; it does not guarantee that images are loaded.

Here is a minimal pattern for a page whose ordinary images are present after navigation:

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
Rank #2
KODAK Dock Plus 4x6 Photo Printer, Smartphone Docking, 4PASS, 50 Sheets
  • Dock Photo Printer: The KODAK Dock Plus is a home photo printer that produces high-quality 4x6” prints directly from compatible smartphones. Featuring an integrated docking station, users can place their phone on the printer for better connection while simultaneously charging the device during printing.
  • Genuine 4PASS dye sublimation printing: Each photo is produced in three color layers and finished with a clear protective lamination layer. In approximately 55 seconds, you receive a smooth, detailed print designed to resist fingerprints, water, and fading for long-lasting quality.
  • Easy to Use: Print photos quickly without complicated setup or technical steps. Simply power on, connect wireless bluetooth, and start printing within seconds. The Dock Plus is built for straightforward operation, making it ideal for first time users and everyday photo printing.
  • Home Printing Station: Designed for stable desktop use, this dock photo printer connects to a power outlet for consistent performance and larger 4x6” prints. Ideal for home printing, photo albums, framing, family events, and everyday picture printing.
  • KODAK Photo Printer APP: Featuring integrated Bluetooth connectivity, this portable printer connects to compatible iOS and Android devices through the KODAK Photo Printer app. Edit, crop, and customize your photos before printing for creative results.
const puppeteer = require('puppeteer');

(async () => {
  const browser = await puppeteer.launch({ headless: true });
  try {
    const page = await browser.newPage();
    page.on('console', (message) => console.log('PAGE:', message.text()));
    page.on('requestfailed', (request) => {
      console.error('REQUEST FAILED:', request.url(), request.failure()?.errorText);
    });

    await page.goto('https://example.com', {
      waitUntil: 'networkidle2',
      timeout: 60000,
    });

    const images = await inspectImages(page, 15000);
    const failed = images.filter((image) => !image.loaded);
    if (failed.length) {
      throw new Error(`Image load failure(s): ${JSON.stringify(failed)}`);
    }

    await page.pdf({ path: 'output.pdf', printBackground: true });
  } finally {
    await browser.close();
  }
})().catch((error) => {
  console.error(error);
  process.exitCode = 1;
});

Place the inspectImages function shown above in the same file before this example’s async function. For a production exporter, distinguish required images from optional ones: a tiny tracking pixel should not necessarily fail a report, while a product image or chart might. Record the failing URL and the page’s Puppeteer and Chromium versions when investigating a repeatable issue.

Why local images can fail while remote images work

Local paths are resolved in the context of the page, not automatically relative to the Node.js script. Check the final URL in currentSrc and the browser’s failed-request and console output. A historical Puppeteer issue described remote images rendering while local images referenced with file:// did not, in a page created from a data:text/html URL. Another older report described disk images missing even after an attempt to wait for network idle. These are useful reproduction clues, not evidence of a universal limitation in current Puppeteer.

  • Verify the path: confirm the file exists, the path is correctly formed, and the process has permission to read it.
  • Verify the page origin: a relative URL resolves against the page URL. A data: page does not provide the same base path as a page served from your application.
  • Inspect browser failures: capture requestfailed events and console messages; do not infer success from a path string alone.
  • Reproduce with the target versions: test the same input under the Puppeteer and Chromium versions used in the export environment.

Prefer a page served from a correctly rooted local web server or another resource-loading approach supported by your environment. Avoid treating a broad browser security bypass as a routine fix; it can change what the page is allowed to access and conceal the actual path or origin problem.

Handle lazy-loaded images and application rendering

An image with loading="lazy" may not request its source until the browser considers it near the viewport. A PDF export that prints before that trigger can therefore miss it. A PuppeteerSharp community discussion recorded one case where removing lazy loading fixed the missing image; that .NET port discussion is an anecdotal lead, and behavior can differ by page and Chromium version.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
Rank #3
Sale
Nelko PP01 Photo Printer, 2x3 Portable Photo Printer, Mini Printer, White
  • 2x3" Portable Photo Printer: The upgraded PP01 photo printer uses advanced inkjet technology. This portable photo printer produces vivid, full-color prints on premium sticky-backed photo paper that is smudge-proof, water-resistant, and tear-resistant. The Nelko mini photo printer is pocket-sized and weighs only 308g, making it ultra-portable for school, travel, and field trips. Each ink cartridge prints up to 80 full-color 2x3 photos on sticky-backed paper
  • Easy Printing via Bluetooth: The PP01 mini photo printer is compatible with iOS and Android phones via Bluetooth. Simply download the Nelko app from Google Play or the App Store. Load the 2x3 photo paper with the smooth side facing down. Install the ink cartridge, connect via Bluetooth, and print directly using the Nelko app. A USB charging cable is included; the adapter is not included
  • High Photo Quality: This mini photo printer uses advanced inkjet technology for clear, vibrant prints. This portable photo printer produces 600 DPI high-resolution images with precise colors, capturing fine details and realistic tones. Each photo comes with adhesive backing, perfect for scrapbooks and preserving your memories. Personalize every photo for holidays, birthdays, or daily events
  • Powerful App: The Nelko 2x3" PP01 photo printer app lets you edit photos and offers a variety of frame designs, making it perfect for personalizing your photos for projects like scrapbooking or journaling. Download the Nelko app to create collages and customize photos with filters, graffiti, borders, stickers, text, AI image editing, and many other features. Edit photos on your phone, then send them to the Nelko app for instant printing in under 90 seconds
  • Versatile Usage Scenarios: This portable photo printer is ideal for travel journals, party favors, and family gatherings. Students use it for planners and photo printing. Crafters use it for DIY projects, custom labels, and scrapbooking. It's a practical tool for bloggers, small businesses, and event photographers to create instant giveaways. Perfect for Mother's Day surprises and heartfelt moments with loved ones using Nelko sticky-backed photo paper.

For a page you control, the most reliable choice is an explicit application signal that says all report content is ready. Alternatively, change the page’s export mode so required images are eager-loaded, or trigger the relevant content-loading behavior before checking image results. Do not assume that waiting or scrolling a fixed amount will load every image: virtualized pages and application-specific lazy loaders may require additional actions.

Canvas content needs a different signal. A canvas can be blank in the PDF even when all document images report loaded, because drawing may happen asynchronously after image load. Wait for the application’s render-complete state (for example, a page-owned flag or a known chart-rendered event) before printing, then verify the output. A 2023 report using Puppeteer 20.5.0 described flaky canvas imagery in a Google Docs PDF; its author reported taking a screenshot and then producing a second PDF as a workaround for that scenario. That report does not establish a general or officially endorsed fix. Reproduce the issue with current versions and a small example before adopting a screenshot-then-PDF sequence.

Separate CSS backgrounds from image elements

If the missing visual is a CSS background rather than an <img>, checking document.images will not find it. Puppeteer’s PDF option printBackground defaults to false. Set it to true when the PDF should include CSS background graphics:

await page.pdf({
  path: 'output.pdf',
  printBackground: true,
});

This setting includes printable backgrounds; it does not repair a failed image request or make an image element load. If the visual still does not appear, inspect the computed background style and the request for its referenced asset. Also check whether print CSS hides or changes the element.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
Rank #4
Sale
Liene Amber M110 Bluetooth Photo Printer 80 Sheets, Portable Photo Printer for iPhone, Thermal Dye Sublimation, Picture Printer 60 Sheets 4x6 Paper & 20 Sheets 3" Square Sticker Paper & 2 Cartridges
  • Dual 4x6" & 3x3" Photo Printer Paper Tray Convenience: Seamlessly print both 6-inch standard photo paper and 3-inch sticky-backed paper with our innovative dual tray design. This compact phone photo printer for smartphone offers easy storage and quick access, making it perfect for diverse printing needs without taking up much space. Enjoy vibrant, high-quality prints every time.
  • Fast Bluetooth Connectivity: Experience lightning-fast printing with our liene photo printer's Bluetooth connection, which pairs in just 13 seconds. Enjoy a seamless and efficient printing experience, perfect for capturing and sharing memories on the go without the hassle of cables or complex setups.
  • Superior Quality Photo Printer 4x6 - Print photos like no other thanks to the thermal-dye sublimation tech adopted by the picture printer for iphone. The dyes deeply penetrate the paper for vibrant photo printing, and the laminated surface is resistant to water, scratches, fingerprints and fading. Get Liene photo printers now as amazing gifts for yourself and your loved ones, print your happy moments together and keep your love forever!
  • Multiple Device Compatibility - Liene picture printer for iphone provides instant photo printing for up to mutiple simultaneous connections. Share with family and friends or print from your different devices. No additional cables required when printing photos with this phone printer.
  • Customize your Printing with the Liene App - Customize your photos with our specialized App! You can add a Polaroid border, insert filters, enhance the contrast and brightness, check printing status, and more. You can even print your ID and Visa photos from home with this iphone photo printer for 4x6 & 3x3 prints.
Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

Common causes and targeted fixes

Symptom Likely area to inspect Next action
<img> exists, but the PDF omits it The source request may still be pending or may have failed. Wait for load or error, inspect currentSrc, and require nonzero natural dimensions for expected images.
Remote images appear; local ones do not Path resolution, page origin, file access, or a failed local request. Check the resolved URL and browser errors; test from a correctly rooted page.
Only below-the-fold images are missing Lazy loading or virtualized content has not been triggered. Use an export-specific loading strategy or application readiness signal before printing.
A chart or drawing is missing while <img> checks pass Canvas or other application-side rendering has not finished. Wait for the app’s render-complete condition; test a minimal reproduction.
CSS artwork disappears but image elements load PDF print backgrounds are disabled, or print CSS changes the page. Set printBackground: true and inspect print styles.
HTTPS asset fails from an HTTP page Scheme, access, or certificate handling. Inspect the request and console in the actual environment. Do not suppress certificate checks by default in production.

The HTTPS-on-HTTP scenario comes from an individual discussion, not a claim that every mixed-scheme page fails in the same way. Base the fix on the observed request error rather than applying a generic certificate workaround.

Or skip the browser setup

If your goal is a website capture rather than debugging a Puppeteer PDF pipeline, ScreenshotNeo offers a screenshot API and MCP server. Its API can return PNG, JPEG, WebP, or PDF, and it accepts a URL in one request. For an image capture, this cURL example saves a WebP file (see the ScreenshotNeo API documentation for options and PDF configuration):

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 and 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 and CAPTCHAs, 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 take_screenshot, get_page_info, and capture_pdf for Claude, Cursor, and other MCP clients. The free plan includes 1,000 shots per month without a card; paid plans start at $5 for 3,000 shots.

Sign up for ScreenshotNeo’s free plan: 1,000 screenshots a month, no card required.

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

Reliability and cost considerations

In a self-hosted PDF workflow, a longer wait can improve reliability but also extends job time. Keep readiness waits bounded, report which expected resources failed, and choose whether each failure should stop the export or produce a marked partial document. Do not retry every failure blindly: a missing local file, denied request, or invalid URL will not be fixed by waiting longer.

Best Value
KODAK Mini 2 Retro 2x3 Portable Photo Printer, 4PASS, 38 Sheets, White
  • Instant Photo Printing: The KODAK Mini 2 Retro is a portable photo printer designed to turn smartphone pictures into high quality prints in seconds. Whether capturing family moments, travel highlights, journaling pages, or creative projects, this mini printer lets you print real photos anytime, anywhere.
  • Genuine 4PASS dye sublimation printing: Each photo is produced in three color layers and finished with a clear protective lamination layer. In approximately 55 seconds, you receive a smooth, detailed print designed to resist fingerprints, water, and fading for long-lasting quality.
  • Easy to Use: Print photos quickly without complicated setup or technical steps. Simply power on, connect wireless bluetooth, and start printing within seconds. The Mini 2 Retro is built for straightforward operation, making it ideal for first time users and everyday photo printing.
  • Print Anytime, Anywhere: Small enough to fit in your hand, bag, or even a pocket, the Mini 2 Retro is built for on-the-go printing. Ideal for parties, trips, school projects, scrapbooks, and spontaneous moments where you want real prints without waiting.
  • KODAK Photo Printer APP: Featuring integrated Bluetooth connectivity, this portable printer connects to compatible iOS and Android devices through the KODAK Photo Printer app. Edit, crop, and customize your photos before printing for creative results.

For reproducible debugging, record the page URL, resolved image URLs, request failures, Puppeteer version, Chromium version, and whether the output uses print backgrounds. Compare the same input in a browser and in the PDF path. This helps separate a page-loading issue from print CSS or PDF rendering behavior without turning an anecdotal workaround into a general rule.

Frequently Asked Questions

Does Puppeteer’s waitForFonts option wait for images?

No. It waits for document.fonts.ready; image readiness needs its own check.

Should I use networkidle0 instead of networkidle2?

Neither setting guarantees that every image has loaded and rendered. Use a readiness check for the content your PDF requires.

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

Can the image helper detect every visual asset on a page?

No. It checks document <img> elements; CSS backgrounds, canvas, and other rendering mechanisms need separate checks.

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.