node-foxit-print
Version:
'Used Foxit Reader to print'
18 lines (15 loc) • 563 B
JavaScript
var child_process = require('child_process');
/**
*
* @param {String} pathToFile [description]
* @param {Function} cb [description]
* @return {[type]} [description]
*/
module.exports.print = function(pathToFile, pathToFoxit, cb) {
var command = '"' + pathToFoxit + '" /p ' + pathToFile;
child_process.exec(command, cb);
}
module.exports.toPDF = function(pathToHtml, pathToWkhtmltopdf, outpath, cb) {
var command = pathToWkhtmltopdf + ' ' + pathToHtml + ' ' + outpath;
require('child_process').exec(command, cb);
};