Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

html-to-image-puppeteer

Package Overview
Dependencies
Maintainers
0
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

html-to-image-puppeteer

Node.js library to convert HTML to image using puppeteer

  • 1.0.1
  • npm
  • Socket score

Version published
Weekly downloads
0
decreased by-100%
Maintainers
0
Weekly downloads
 
Created
Source

html-to-image-puppeteer

Node.js library to convert HTML to image using Puppeteer.

Table of Contents

  • Installation
  • Usage
  • Scripts
  • Contributing
  • License

Installation

To install the dependencies, run:

npm install


Usage
Here is an example of how to use the library:

const { convertHtmlToImage } = require('html-to-image-puppeteer');

const htmlContent = '<html><body><h1>Hello, World!</h1></body></html>';
const outputPath = 'output.png';

convertHtmlToImage(htmlContent, outputPath)
  .then(() => {
    console.log('Image created successfully!');
  })
  .catch((error) => {
    console.error('Error creating image:', error);
  });

Scripts
test: Run the tests using Jest.
lint: Lint the code using ESLint.
build: Compile the TypeScript code to JavaScript.
To run a script, use:

For example, to run the tests:

Contributing
Contributions are welcome! Please open an issue or submit a pull request.

Contributors
Subodha Sahu (subodha.sahu-graymatter@monotype.com)

License
This project is licensed under the MIT License. See the LICENSE file for details.

FAQs

Package last updated on 30 Jul 2024

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