I load the file, change the text, and save the file. I check text was updated and it has but when it's saved, it's same as before??
Assume it's in a function and imports have been done
const file = './file.pdf';
const doc = new nopodofo.Document();
await new Promise((resolve, reject) => doc.load(file, e => e ? reject(e) : resolve()));
let page = doc.getPage(0);
let field = page.getField(0);
let text = page.getFields().filter(x => x.text[0] === '$')[0];
text.text = 'myemail@gmail.com';
console.log(doc.getPage(0).getFields().map(x => x.text)); //Yes it did change
doc.write('./test.pdf', function(a, b){})
I load the file, change the text, and save the file. I check text was updated and it has but when it's saved, it's same as before?? Assume it's in a function and imports have been done