pdf-lib
pdf-lib copied to clipboard
pdfDoc.addJavaScript is not a function
I am trying to add custom validation on textField using the addJavaScript function. While doing so getting an error 'pdfDoc.addJavaScript is not a function'. Adding the code snippet
`const pdfDoc = await PDFDocument.create()
pdfDoc.addJavaScript(
'foo',
'function foo() { return "foo"; }'
);`
Above javaScript function want to call on textFiled change event.
Please help me to achieve this.
Bump
Please fill out the new bug report form if you're still having trouble with this.