frinyvonnick

frinyvonnick/node-html-to-image

A Node.js module that generates images from HTML

TypeScript
877
124
Apache License 2.0

{{fontUrl}}") format("truetype"); } body { font-family: 'testFont'; } </style> </head> <body> <h1>My awesome title</h1> <p>my awesome content</p> </body> </html> ` nodeHtmlToImage({ output: './image.png', html: html, content: { fontUrl: _data } }) ``` ### Using the buffer instead of saving to disk In some cases you might not want to save the output to a file. You can use the buffer instead: ```js const nodeHtmlToImage = require('node-html-to-image') nodeHtmlToImage({ html: '<html><body>Hello world!</body></html>' }) .then(buffer => console.log('The image buffer was created successfully!')) ``` ### Generating multiple images You can generate multiple images by providing an array of objects to the content property: ```js const nodeHtmlToImage = require('node-html-to-image') nodeHtmlToImage({ output: './image.png', html: '<html><body>Hello {{name}}!</body></html>', content: [{ name: 'you' }, { name: 'me'

Total donated
Undistributed
Share with your subscribers:

Recipients

How the donated funds are distributed

Support the dependencies

Support the repos that depend on this repository

Top contributors

frinyvonnick's profile
frinyvonnick
63 contributions
dependabot[bot]'s profile
dependabot[bot]
16 contributions
favna's profile
favna
4 contributions
mrbjjackson's profile
mrbjjackson
1 contributions
jewkesy's profile
jewkesy
1 contributions
gravelcycles's profile
gravelcycles
1 contributions
emhagman's profile
emhagman
1 contributions
fcolacilli's profile
fcolacilli
1 contributions
cyberjag's profile
cyberjag
1 contributions
MarkDeuerling's profile
MarkDeuerling
1 contributions

Recent events

Kivach works on the Obyte network, and therefore you can track all donations.

No events yet