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

Use Playwright to open a website in BrowserCat’s hosted browser, then save a full-page screenshot and print the page to PDF. BrowserCat renders what the site already displays; it does not translate a page into Hindi, and its reviewed documentation does not guarantee Devanagari font coverage. Check both files for correct Hindi characters and layout after capture.

What you need before you start

  • A project with Node.js and Playwright installed.
  • A BrowserCat account and API key, stored as the BROWSERCAT_API_KEY environment variable.
  • The URL of a page that already displays the Hindi content you want to capture.

BrowserCat’s quick start connects Playwright to its hosted browser at wss://api.browsercat.com/connect and sends the key in an Api-Key header. See the BrowserCat quick start for its connection workflow.

Generate the screenshot and PDF with Playwright

This example combines BrowserCat’s documented remote connection with Playwright’s screenshot and PDF methods. It saves a full-page PNG and an A4 PDF in the directory where you run the script.

import { chromium } from 'playwright';

const apiKey = process.env.BROWSERCAT_API_KEY;
if (!apiKey) throw new Error('Set BROWSERCAT_API_KEY before running this script.');

const browser = await chromium.connect('wss://api.browsercat.com/connect', {
  headers: { 'Api-Key': apiKey },
});

try {
  const page = await browser.newPage();
  await page.goto('https://example.com', { waitUntil: 'networkidle' });
  await page.screenshot({ path: 'website.png', fullPage: true });
  await page.pdf({ path: 'website.pdf', format: 'A4' });
} finally {
  await browser.close();
}

Replace https://example.com with the page URL. The code uses networkidle as a practical wait condition, but pages with persistent network activity may not reach it; in that case, wait for a meaningful page element or use a suitable fixed delay. The BrowserCat Playwright cheatsheet documents full-page screenshots and PDF output, including file paths and page formats: Playwright cheatsheet.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
#1 Best Overall
Decumeby Ai Mouse with Voice Typing, 120 Language Translation (Dark Gray)
  • Seamless Connectivity: Enjoy worry free compatibility and connectivity with Bluetooth for laptops and tablets, and 2.4G wireless connection for lag free performance within a 10 meter range.
  • Efficient Voice Input: Dictate emails or reports at a speed of 400 words per minute with up to 98% accuracy. Use voice commands to open websites quickly and conveniently.
  • 120 Languages Real Time Translation: Speak naturally as the AI mouse translates your speech into 120 languages, ideal for meetings, online courses, or chatting globally without additional apps.
  • Adjustable Optical Sensor: Equipped with a high performance optical sensor, easily key between 1200 to 3000 DPI for a stable tracking experience, whether designing or web browsing.
  • Screenshots and OCR Translation: Captures text, images, PDFs, videos, or games with one click and instantly translate them, excellent for students, researchers, or reading foreign content.

Choose screenshot and PDF settings

  • fullPage: true captures beyond the currently visible viewport. For a viewport-only image, omit this option.
  • format: 'A4' sets the PDF paper size. The documented default is Letter; the cheatsheet also lists common paper formats.
  • For a wide page, use landscape: true in the page.pdf() options. Page size and orientation affect scaling and pagination.

Check Hindi text and page layout

After generating the files, open both website.png and website.pdf. Check that Devanagari characters and conjuncts appear correctly, that line breaks make sense, and that text or images are not clipped. A screenshot and a PDF can paginate or lay out the same page differently.

The available BrowserCat documentation does not establish which Devanagari fonts are installed, how to add a font, or that Hindi shaping is guaranteed. If characters are missing or shaped incorrectly, first verify that the source page’s font has loaded in the browser. Then investigate whether an appropriate font can be made available to the rendered page and regenerate the files. Do not assume a specific font or BrowserCat setting will resolve the issue without verifying the output.

Rank #2
Decumeby Ai Mouse with Voice Typing, 120 Language Translation (Transparent)
  • Seamless Connectivity: Enjoy worry free compatibility and connectivity with Bluetooth for laptops and tablets, and 2.4G wireless connection for lag free performance within a 10 meter range.
  • Efficient Voice Input: Dictate emails or reports at a speed of 400 words per minute with up to 98% accuracy. Use voice commands to open websites quickly and conveniently.
  • 120 Languages Real Time Translation: Speak naturally as the AI mouse translates your speech into 120 languages, ideal for meetings, online courses, or chatting globally without additional apps.
  • Adjustable Optical Sensor: Equipped with a high performance optical sensor, easily key between 1200 to 3000 DPI for a stable tracking experience, whether designing or web browsing.
  • Screenshots and OCR Translation: Captures text, images, PDFs, videos, or games with one click and instantly translate them, excellent for students, researchers, or reading foreign content.

Choose between a template PDF and browser automation

BrowserCat describes two approaches to PDF generation. A template-oriented route uses HTML, CSS, JavaScript, and customization data to produce a document. Browser automation through Playwright, Puppeteer, or Selenium is the more flexible route for navigating and capturing an existing live website. The template route is a better fit when you control the document structure; automation is useful when the page needs navigation or interaction before capture. BrowserCat’s explanation is at PDF generation.

Troubleshooting

Authentication or connection fails

Confirm that BROWSERCAT_API_KEY is set in the environment used to launch Node.js, and that the header is spelled Api-Key. Check BrowserCat’s current quick start if the connection endpoint or authentication instructions have changed.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
Rank #3
Decumeby Ai Mouse with Voice Typing, 120 Language Translation (Light Gray)
  • Seamless Connectivity: Enjoy worry free compatibility and connectivity with Bluetooth for laptops and tablets, and 2.4G wireless connection for lag free performance within a 10 meter range.
  • Efficient Voice Input: Dictate emails or reports at a speed of 400 words per minute with up to 98% accuracy. Use voice commands to open websites quickly and conveniently.
  • 120 Languages Real Time Translation: Speak naturally as the AI mouse translates your speech into 120 languages, ideal for meetings, online courses, or chatting globally without additional apps.
  • Adjustable Optical Sensor: Equipped with a high performance optical sensor, easily key between 1200 to 3000 DPI for a stable tracking experience, whether designing or web browsing.
  • Screenshots and OCR Translation: Captures text, images, PDFs, videos, or games with one click and instantly translate them, excellent for students, researchers, or reading foreign content.

The page is incomplete or still loading

Confirm that the target URL opens and that the page’s Hindi content is visible before capture. If networkidle never occurs because the page continues making requests, wait for a relevant selector or another condition that indicates the content is ready.

The PDF has unexpected pagination or orientation

Set a deliberate paper format and, for wide content, try landscape: true. Inspect the result at the chosen size; printing a web page to paper dimensions can change scaling and page breaks compared with the browser viewport.

Rank #4
Decumeby Ai Mouse with Voice Typing, 120 Language Translation
  • Seamless Connectivity: Enjoy worry free compatibility and connectivity with Bluetooth for laptops and tablets, and 2.4G wireless connection for lag free performance within a 10 meter range.
  • Efficient Voice Input: Dictate emails or reports at a speed of 400 words per minute with up to 98% accuracy. Use voice commands to open websites quickly and conveniently.
  • 120 Languages Real Time Translation: Speak naturally as the AI mouse translates your speech into 120 languages, ideal for meetings, online courses, or chatting globally without additional apps.
  • Adjustable Optical Sensor: Equipped with a high performance optical sensor, easily key between 1200 to 3000 DPI for a stable tracking experience, whether designing or web browsing.
  • Screenshots and OCR Translation: Captures text, images, PDFs, videos, or games with one click and instantly translate them, excellent for students, researchers, or reading foreign content.

Hindi glyphs are missing, clipped, or malformed

Check the screenshot and PDF separately, and verify that the page’s intended font has finished loading before export. BrowserCat’s reviewed documentation does not specify Hindi font availability or promise Devanagari rendering, so judge success from the generated files rather than assuming it.

The capture succeeds but does not contain Hindi

BrowserCat captures the page as rendered; it does not translate content. Use a URL or page state that already shows Hindi before taking the screenshot.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
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 can return a website screenshot or PDF from one GET request. It removes cookie banners, popups, and chat widgets before capture; bot checks, blank pages, and failed loads are never billed. Its MCP server lets AI agents take screenshots. The free plan includes 1,000 screenshots a month with no card, and paid plans start at $5 for 3,000.

Example cURL request (replace the 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, including PDF output. Sign up free for 1,000 screenshots a month, with no card required.

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.