const pdftk = require('node-pdftk');
pdftk.configure({
bin: 'C:/Program Files (x86)/PDFtk Server/bin',
Promise: require('bluebird'),
ignoreWarnings: true,
});
pdftk
.input([textfile, change,log])
.output()
.then(buf => {
let path = './merged.pdf';
fs.open(path, 'w', function (err, fd) {
fs.write(fd, buf, 0, buf.length, null, function (err) {
fs.close(fd, function () {
console.log('wrote the file successfully');
});
});
});
});
This is my code. But the error i am getting is : pdftk was called but is not installed on your system.
I installed both pdftk and pdftk server. I set the pdftk_path variable to 'C:/Program Files (x86)/PDFtk Server/bin', in my environment variables too.
I configured the same through options. But still i am getting the error.
Please help me
const pdftk = require('node-pdftk');
pdftk.configure({
bin: 'C:/Program Files (x86)/PDFtk Server/bin',
Promise: require('bluebird'),
ignoreWarnings: true,
});
pdftk
.input([textfile, change,log])
.output()
.then(buf => {
let path = './merged.pdf';
fs.open(path, 'w', function (err, fd) {
fs.write(fd, buf, 0, buf.length, null, function (err) {
fs.close(fd, function () {
console.log('wrote the file successfully');
});
});
});
});
This is my code. But the error i am getting is : pdftk was called but is not installed on your system.
I installed both pdftk and pdftk server. I set the pdftk_path variable to 'C:/Program Files (x86)/PDFtk Server/bin', in my environment variables too.
I configured the same through options. But still i am getting the error.
Please help me