Highlight annotation is broken for some pdf

I am using version 7.2.1

For some pdf, the highlight annotation is not working properly. The highlighted text is not taking space as the text in the pdf. The same thing is happening in the official demo.

Hi there!

Are you able to provide us with that document so we can reproduce and find a fix?

Thank you!
Logan

pone.0192022.pdf (2.2 MB)

Here it is

1 Like

Thanks @ehtesham.ahmad.nadim! We can reproduce this issue and are looking into a fix now.

1 Like

Hey there!

I looked into a bit, and the error is coming from the core PDF.js library which unfortunately we do not support. The issue is reproducible in vanilla PDF.js. You can reproduce by opening your document here and then selecting some text, copying it, and pasting it somewhere else. You will see that there are no spaces in the text.

To get this issue fixed you will have to open a ticket in the open source PDF.js repo.

If you wish, we can also open a ticket there on your behalf, and share the document you posted with your permission. Let us know if you would like us to do that.

If you do open a ticket there, please post a link to it here so we can track it and make sure it gets merged in once the ticket is resolved.

Thank you!
Logan

1 Like

Hey @Logan,
Please open a ticket in the PDF.js repo and let me know the update.