Can you reproduce using one of our samples or online demos?
Yes
Are you using the WebViewer server?
No
Does the issue only happen on certain browsers?
No
Is your issue related to a front-end framework?#
No
Is your issue related to annotations?
Yes
Please give a brief summary of your issue:
When a callout rectangle is modified via code, the text in it get’s invisible.
Please describe your issue and provide steps to reproduce it:
We have PDFs with callout rectangles. When we open the PDF everything looks fine, as it should be:
I was able to reproduce the issue with your project, but I also tried creating a callout in the viewer and I couldn’t get the text to disappear. Could you explain how you created those callout annotations as well?
Could you explain how you created those callout annotations as well?
Unfortunately not as this is a pdf we got from one of our customers.
I also noticed you are setting ReadOnly to true for all the annotations.
Yes. It doesn’t make that much sense in that example. But this was intended, as it is a part of the code we are using.
When I double click the annotations, I see a PDFWorker error and the subject isn’t callout when I call the API below.
I tested this. This happens with all comments (regardless if it is created via the webviewer or via a external program), after this line of code const arr = new Uint8Array(data);
async getPDFAsBlob(): Promise<Blob> {
const docViewer = this.wvInstance!.Core.documentViewer;
const annotManager = docViewer.getAnnotationManager();
const annots = annotManager.getAnnotationsList();
annots.forEach(annot => {
annot.ReadOnly = true;
})
const doc = docViewer.getDocument();
const annotations = await annotManager.exportAnnotations();
const data = await doc.getFileData({ xfdfString: annotations });
// This Line causes the error when selecting an annotation after the function ran.
// If this line is omitted and a dummy blob is returned, the error doesn't occur
const arr = new Uint8Array(data);
return new Blob([arr], { type: 'application/pdf' });
}