Javascript wrapper for Sejda PDF, the engine behind Sejda.com
var sejda = require('sejda-js')
sejda.splitByPages({
files:['pdfs/2_pages.pdf'],
pages: '1',
output: '/tmp'
},
function(err, stdout, stderr){
console.log(stdout);
console.error(stderr);
if(err) console.error('Failed. ', err)
else console.log('OK')
}
)
Reference implementations:
AGPLv3