1.0.3 • Published 10 months ago

w-html2png v1.0.3

Weekly downloads
-
License
MIT
Repository
github
Last release
10 months ago

w-html2png

A package for html to png by chromium.

language npm version license npm download npm download jsdelivr download

Documentation

To view documentation or get support, visit docs.

Installation

Using npm(ES6 module):

Note: w-html2png is mainly dependent on puppeteer.

npm i w-html2png

Example for function:

Link: [dev source code]

import WHtml2png from './src/WHtml2png.mjs'

async function testa() {

let html = `
let b64 = await WHtml2png(width, height, scale, html)
// console.log('b64', b64)

fs.writeFileSync('./test-scla.png', b64, { encoding: 'base64' })

console.log('finish')

} testa() .catch((err) => { console.log(err) })

1.0.3

10 months ago

1.0.2

10 months ago

1.0.1

10 months ago

1.0.0

10 months ago