I have multiple checkboxes now I want to make one of them checked dynamically and it's not clickable (readonly) using the PDFkit.
Here is what I have tried so far.
// create a document and pipe to a blob
var doc = new PDFDocument();
var stream = doc.pipe(blobStream());
doc.initForm();
doc.formCheckbox('checked', 45,50,16,16, {
backgroundColor: '#fff'
})
// end and display the document in the iframe to the right
doc.end();
stream.on('finish', function() {
iframe.src = stream.toBlobURL('application/pdf');
});
Repo here: demo nodejs How can I make this checkbox be checked automatically and make it disabled so that the user can not check or uncheck the checkbox? any idea will be appreciated.