PDF.js Express Version
6.14.9
Detailed description of issue
We are trying to add text annotations with the default tool annotations header. When I added the text per click, this xml is created:
In the content section to may “"” are printed.
If we move the text or change the content of the annotation, the XML is changed and printed the correct way.
Expected behaviour
We would expect the webviewer to export the annotation the right way right at the beginning and not only, when it got changed.
Does your issue happen with every document, or just one?
With every document
Code snippet
annotManager.exportAnnotations({ links: false, widgets: false, annotList: annotList }).then( xfdfString => {
console.log(xfdfString)
instance.docViewer.getDocument().getFileData({xfdfString}).then(function (data) {
const arr = new Uint8Array(data);
var blob = new Blob([arr], {type: 'application/pdf'});
var reader = new FileReader();
reader.readAsDataURL(blob);
reader.onloadend = function () {
app.file.base64 = reader.result;
app.file.base_64_string = app.file.base64.split(',')[1];
app.file.atob = atob(reader.result.replace('data:application/pdf;base64,', ''));
app.file.file_name = app.file_name;
app.file.xfdf = xfdfString;
}
})
});