VadimDez/ng2-pdf-viewer

Bug: Selected text from PDF is not copied to clipboard.

agravity-philipp opened this issue · 4 comments

Bug Report or Feature Request (mark with an x)
- [ ] Regression (a behavior that used to work and stopped working in a new release)
- [x] Bug report -> please search issues before submitting
- [ ] Feature request
- [ ] Documentation issue or request

Since version 10.1.0 ([https://github.com//pull/1027] - Chore: Update pdfjs-dist to 3.10.111) the selected text in the PDF could not be copied. Not via Ctrl+c nor with the browser supported copy button click.

Affected (and tested) versions: 10.1.0, 10.2.0, 10.2.1 10.2.2

I reverted to 10.0.0 and the selected text could be copied again.
Because of the [https://github.com//issues/1088] - PDF.js vulnerable to arbitrary JavaScript execution upon opening a malicious PDF - fix I would not want to stay on this version forever.

Tested an verified on browser:
Microsoft Edge - Version 125.0.2535.92 (Offizielles Build) (64-Bit)
Mozilla Firefox - Version 127.0 (64-Bit)

Thanks!

Hi @shamoon ! Could you have a look on that since you made the upgrade of pdfjs-dist to 3.10.111 😉.
Thanks!

Are you able to reproduce this issue on https://vadimdez.github.io/ng2-pdf-viewer/ ?

Copy / paste from the demo works fine for me

Thank you @VadimDez and @shamoon for your fast reply.

I thought I found the issue while switching between 10.0.0 and 10.2.2 and I really tested it with every release between, with the described results.

After your comments I created a fresh Angular 18 and a new NX monorepo project and added my code to it and both worked fine.

The truth is a little bit embarrassing... I am handling key-shortcuts and did not respect Ctrl+C. I have no idea why it worked before, but it seems that it is fixed now.

Closing ticket!