1.0.4 • Published 11 months ago

html-to-image-puppeteer v1.0.4

Weekly downloads
-
License
MIT
Repository
-
Last release
11 months ago

html-to-image-puppeteer

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

Table of Contents

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.
1.0.4

11 months ago

1.0.3

11 months ago

1.0.2

11 months ago

1.0.1

11 months ago

1.0.0

11 months ago