Driver FixRecommendedSound, Wi-Fi or graphics acting up? Check drivers firstFind missing or outdated drivers fast.Check DriversHalloween DealsAmazon USHalloween week deals: useful picks before month-endAmazon US: current deals, useful picks and tech finds.Check DealsSlow PC?RecommendedPC slow today? Run a repair scan before it gets worseResolve common Windows issues and optimize system performance.Scan Now×
FREEDOM251

Freedom251 › Blog › Chromium

How to Screenshot an Indian-Language Webpage with Puppeteer in Node.js

By Freedom251 Team · · 5 min read

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

Use Puppeteer’s page.screenshot() after the page’s content and fonts are ready. If Hindi, Tamil, Bengali, or other text appears as boxes or broken glyphs, the likely issue is missing or unloaded font coverage in the Chromium environment—not the screenshot call itself. A successful capture does not guarantee that every character rendered correctly, so inspect the image.

Capture an Indian-language webpage with Puppeteer

This example uses Puppeteer’s managed browser installation and saves a full-page PNG. Replace the example URL with the page you need to capture.

As an Amazon Associate I earn from qualifying purchases.

  1. Install puppeteer and its compatible browser as described in the Puppeteer installation guide.
  2. Save this as screenshot.mjs and run it with Node.js.
import puppeteer from 'puppeteer';

const browser = await puppeteer.launch();
try {
  const page = await browser.newPage();
  await page.setViewport({ width: 1440, height: 1000, deviceScaleFactor: 1 });
  await page.goto('https://example.com/page-in-indian-language', {
    waitUntil: 'networkidle2',
  });

  // Wait for available web fonts to finish loading.
  await page.evaluate(() => document.fonts.ready);

  await page.screenshot({ path: 'page.png', fullPage: true });
} finally {
  await browser.close();
}

Puppeteer’s screenshot guide demonstrates navigating to a page and calling Page.screenshot(). It also documents screenshots of a selected element. See the screenshots guide and the Page.screenshot() API reference.

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

Wait for the page you actually need

networkidle2 is a navigation readiness option used in Puppeteer’s screenshot example; it is not proof that a page’s content is semantically complete. Client-rendered pages may still be updating, and lazy-loaded content may not appear until it is brought into view. If the page has a known ready marker, wait for it explicitly:

await page.goto('https://example.com/page-in-indian-language', {
  waitUntil: 'networkidle2',
});
await page.waitForSelector('[data-page-ready="true"]');
await page.evaluate(() => document.fonts.ready);
await page.screenshot({ path: 'page.png', fullPage: true });

Replace [data-page-ready="true"] with a selector that exists only when the relevant content is ready. If your target loads content on scroll, trigger the page’s own lazy-loading behavior before capturing; waiting for navigation alone cannot guarantee that off-screen content has loaded.

Wait for fonts without assuming screenshot does it

document.fonts.ready is a practical browser-side wait for font loading. Puppeteer documents a default font wait for PDF generation, but do not assume that the same documented guarantee applies to Page.screenshot(). Puppeteer’s PDF generation guide describes the PDF behavior.

Why Indian-language text can appear as boxes or broken glyphs

“Indian language” does not identify one script or one font-coverage requirement. First determine which scripts and characters the page actually uses. The intended web font may not have loaded, or Chromium may not have access to a font with the necessary glyphs. In either case, the browser may use fallback rendering that differs from what you expected.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
  • Check whether the page’s intended web font finished loading.
  • Confirm that the browser environment has a font covering the actual script and characters on the page.
  • Inspect the captured image for tofu boxes, missing conjuncts, unexpected fallback, clipping, and changed text layout.
  • Run the capture in the same operating system or container used in production; installed fonts and browser dependencies can differ between machines.

Changing screenshot syntax cannot supply missing fonts. If the page relies on its own web font, verify that it loads successfully; if the environment must provide the font, install or bundle a suitable font there. Puppeteer’s PDF documentation discusses fonts, while its troubleshooting guide covers browser dependencies and example font packages. Those package examples are platform-specific, so check them against your actual target image.

Choose how Chromium is installed

Setup What it means When it fits
puppeteer The installation guide says this package downloads a compatible Chrome for Testing browser. Use it when you want Puppeteer to manage the browser download.
puppeteer-core It does not download a browser; you manage or connect to a separate or remote browser. Use it when your deployment already manages Chromium or uses a remote browser.

Package managers may block installation scripts. Puppeteer documents manually installing the browser in that situation. Check the installation guide for the current procedure rather than assuming the browser download happened.

Version requirements change. The Puppeteer system-requirements documentation result identifies Puppeteer 25.12.0 and Node 22.12+; verify the current requirements for the version you install before treating those figures as requirements for your setup.

Troubleshoot a bad capture

What you see Likely cause What to check or change
Boxes or missing characters The loaded fonts do not cover the page’s script, or the intended font did not load. Identify the actual script, verify font loading, and make a suitable font available to Chromium.
Some text uses an unexpected typeface The web font was unavailable or had incomplete coverage, so fallback rendering was used. Check font requests and coverage; inspect the PNG rather than relying only on a successful screenshot call.
Text or page sections are missing Capture started before client-side content was ready, or content is lazy-loaded. Wait for a page-specific ready selector or state, and trigger the relevant lazy-loading behavior.
Layout differs between development and production The machines or containers may have different fonts, browser dependencies, or platform configuration. Test using the same target image and operating system as the screenshot job; consult Puppeteer’s platform-specific troubleshooting guidance.
Browser does not launch after installation The browser download may have been blocked by package-manager settings or install scripts. Follow Puppeteer’s documented manual browser-install procedure and confirm that the executable is available.
Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

Or skip the browser setup

ScreenshotNeo is a website screenshot API and MCP server. One GET request can return a screenshot or PDF; its cleanup options accept consent banners and remove 60+ known consent platforms, newsletter popups, and chat widgets before capture. Each cleanup step can be turned off. Bot checks, blank pages, timeouts, failed loads, and cache hits are not billed, and 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.

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

For a quick capture, create an API key and run this cURL request (replace the target URL as needed):

curl -G "https://api.screenshotneo.com/v1/shot" -d access_key=YOUR_API_KEY --data-urlencode url=https://stripe.com -o shot.webp

See the ScreenshotNeo API documentation for request options. The free plan includes 1,000 shots per month with no card; paid plans start at $5 for 3,000 shots. Sign up for ScreenshotNeo and start with 1,000 free screenshots a month, no card required.

Frequently Asked Questions

Can Puppeteer capture just one element instead of the whole page?

Yes. Puppeteer documents element screenshots in its screenshots guide; select the element and use the supported element screenshot workflow.

Does Puppeteer’s font-wait behavior for PDFs also apply to screenshots?

Do not assume so. Puppeteer documents the default font wait for PDF generation; for screenshots, explicitly wait for document.fonts.ready and inspect the output.

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

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.

ChromiumIndian languagesNode.jsPuppeteerweb screenshots

Leave a Reply

Your email address will not be published. Required fields are marked *

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

Recommended PC Tool
Recommended PC Tool
Windows Errors? Fix Them Before They SpreadFree repair scan
Crashes, No Sound, or Screen Glitches?Free driver scan

Two free Windows tools

One Free Minute Could Fix That PC

Before you go - each of these free tools takes about a minute and tackles what quietly slows a Windows PC down.

Special offer. View Outbyte info, uninstall instructions, EULA, and Privacy Policy.