You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
const {execSync} = require('child_process')
|
|
|
|
function convert( filename, pages ){
|
|
console.log(pages)
|
|
if (filename.endsWith('.pdf')) {
|
|
execSync( 'qpdf '+filename+' --pages '+filename+' '+pages.join(',')+' -- ./saved/pdf/'+filename, {cwd:'public'})
|
|
}
|
|
}
|
|
|
|
module.exports.convert = convert
|
|
|