PDF.js Express Version
Detailed description of issue
Hello,
I have a problem to merge any annotation with PDF document?
I add the signature or any other annotation and then expect that document will have annotation attached to it after, but it doesn’t have.
I am calling annotManager.exportAnnotations() in order to then pass xfdfString to getFileData
function. Later, when I construct Blob and then download it, it doesn’t contain signature in it.
Expected behaviour
I’m expecting to have annoation after I create and download Blob.
Does your issue happen with every document, or just one?
That is happening with every document.
Code snippet
const myFN = async () => {
const doc = docViewer.getDocument();
const xfdfString = await annotManager.exportAnnotations( {links: false, widgets: false});
const data = await doc.getFileData({
xfdfString
});
const arr = new Uint8Array(data);
const blob = new Blob([arr], { type: 'application/pdf' });
// const element = document.createElement("a");
const file2 = new File([blob], "updatedFile.pdf", {type: 'application/pdf'});
}