Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enable text content #52

Merged
merged 10 commits into from
Jun 22, 2024
Merged

Enable text content #52

merged 10 commits into from
Jun 22, 2024

Conversation

lfoppiano
Copy link
Owner

@lfoppiano lfoppiano commented May 22, 2024

This PR enable the textlayer on top of the canvases, with the text layer it's possible to select the text extracted from the PDF (#16).
Since the annotations are placed on top of the text layer, when they are very dense, it might be possible that annotations boxes and selection interfere.

This PR also update pdf.js to version 4 (#36) which fixes some vulnerabilities.

image

More information on this PR, in the related issue #16

lfoppiano and others added 7 commits May 18, 2024 08:23
…+ syntax usage after upgrading PDFJS from version 3 to 4. Also, updated transpilation libraries to the latest versions to avoid errors with old libraries.
@lfoppiano lfoppiano linked an issue May 22, 2024 that may be closed by this pull request
@lfoppiano lfoppiano requested a review from t29mato May 25, 2024 00:25
@lfoppiano lfoppiano marked this pull request as ready for review May 25, 2024 00:25
@lfoppiano
Copy link
Owner Author

@t29mato two more questions for you:

  1. should we add a flag to disable the text layers so that user may disable them if they don't need and/or if they are not happy with their interference with the annotations?
  2. do you have any suggestion on the z-index I hardcoded, please do let me know.

@t29mato
Copy link
Collaborator

t29mato commented May 27, 2024

  1. In the latest code, it's not the text layer but the annotations that interfere with text layer selection. So, I think a button to disable annotations might be a good idea. Another idea could be to have a copy menu appear when clicking on annotations, but since annotations don't have text information, that might be tricky.
  2. I think it's fine to leave the hardcoded z-index as it is.

@lfoppiano lfoppiano merged commit c3ef337 into main Jun 22, 2024
14 checks passed
@lfoppiano lfoppiano deleted the enable-text-content-2 branch June 22, 2024 09:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Update pdf.js to version 4
2 participants