eml2png-nodejs
Paint the EML to a single PNG image.
Requirements
- nodejs v8 or later.
- wkhtmltopdf/wkhtmltoimage v0.12 (with patched qt) or later.
Installation
The latest and greatest version of this software is available through npm.
npm install eml2png
Usage
// include the node moduleconst wkhtmltox = ; // Locations of the binaries can be specified, but this is// only needed if the programs are located outside your PATHprocessenvWKHTMLTOIMAGE = '/opt/local/bin/wkhtmltoimage'; // instantiate a new converter.const converter = ; // Convert from file path and save into diskconst eml_8 = 'test/messages/wordpress.eml';converter; // Convert from file path and return a streamconverter; // Convert from stringconst fs = ;const data = await fs;converter;
Example
- See example/README.md.