UNPKG

node-image-from-html

Version:

This single-dependency library provides a simple API to render HTML content using <a href="https://github.com/puppeteer/puppeteer">Puppeteer</a> (A headless chromium brower) into png and jpeg images, insuring security and efficiency in the process. Writte

7 lines (6 loc) 237 B
/// <reference types="node" /> /** * Converts a buffer into a DataURI for embedding within html. * @param input The input to be converted. */ export declare function toDataUri(input: Buffer, imageType?: "png" | "jpeg"): string;