Socket
Socket
Sign inDemoInstall

screenshot-web

Package Overview
Dependencies
49
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

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
0
Maintainers
1
Created
Weekly downloads
 

Readme

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

Last updated on 21 May 2020

Did you know?

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

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc