phantomjs-pdf for NodeJS
Simple and lightweight HTML to text conversion using Node and PhantomJS.
Installation
npm install phantomjs-pdf
Dependencies
- PhantomJS
- Async
- Temp
- Debug
Conversion API
The API exposes a single function 'convert'. Using this function, you can input a multitude of settings, which are further specified below:
var pdf = ;;
Options
Calling convert() requires an options object, which includes the following definitions:
Instead of paths, one can also provide properly escaped source code.
Runnings File
https://github.com/ariya/phantomjs/wiki/API-Reference-WebPage#wiki-webpage-paperSize