Socket
Socket
Sign inDemoInstall

screenshot-web

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

screenshot-web

A high-level API to control headless Chrome over the DevTools Protocol


Version published
Weekly downloads
1
Maintainers
1
Weekly downloads
 
Created
Source

screenshot-web

Build status

Screenshot a website

const web = require('screenshot-web');

(async () => {
  const browser = await web.launch();
  const page = await browser.newPage();
  await page.goto('https://example.com');
  await page.screenshot({path: 'example.png'});

  await browser.close();
})();

website to pdf

const web = require('screenshot-web');

(async () => {
  const browser = await web.launch();
  const page = await browser.newPage();
  await page.goto('https://examplle.com', {waitUntil: 'networkidle2'});
  await page.pdf({path: 'example.pdf', format: 'A4'});

  await browser.close();
})();

FAQs

Package last updated on 21 May 2020

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc