Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- var ngCompile = require('ng-node-compile');
- var ngEnvironment = new ngCompile();
- var templateHTML = getTemplateById(id);
- templateHTML = ngEnvironment.$compile(templateHTML)(datas);
- var phantomHTML2PDF = require('phantom-html-to-pdf')(options);
- phantomHTML2PDF(convertOptions, function (error, pdf) {
- if(error) console.log(error);
- // Here you have 'pdf.stream.path' which is your tmp PDF file
- callback(pdf);
- });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement