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

Text annotations with line breaks lose their first line #17079

Closed
StevenSwitten opened this issue Oct 6, 2023 · 6 comments · Fixed by #17511
Closed

Text annotations with line breaks lose their first line #17079

StevenSwitten opened this issue Oct 6, 2023 · 6 comments · Fixed by #17511

Comments

@StevenSwitten
Copy link

Attach (recommended) or Link to PDF file here: Can be reproduced on the demo page: https://mozilla.github.io/pdf.js/web/viewer.html

Configuration:

  • Web browser and its version: Chrome latest
  • Operating system and its version: Windows

Steps to reproduce the problem:
1. Click the Text annotation button
2. Type something. Press enter key. Type some more
3. Save the PDF

What is the expected behavior? (add screenshot)
The new PDF should have the full text annotation

What went wrong? (add screenshot)
The first line of the text annotation is omitted

image

image

@calixteman
Copy link
Contributor

calixteman commented Oct 6, 2023

I can reproduce with chrome.
The generated pdf doens't contain the first string so it likely means that something is wrong when extracting the string from the editable div.

@jatinder14
Copy link

@Snuffleupagus @StevenSwitten @calixteman I want to resolve this issue .
would you be able to assign it to me ?

@Ztong55
Copy link

Ztong55 commented Jan 8, 2024

I was stuck with this problem. I have found that this is caused by '#content' of text editor is different from the actual inner text of the text editor.

@jatinder14
Copy link

@Ztong55 so should i fix it or no?

@Ztong55
Copy link

Ztong55 commented Jan 8, 2024

@jatinder14 I am only a user of this package and can't decide whether you shall fix it.

@jatinder14
Copy link

I was stuck with this problem. I have found that this is caused by '#content' of text editor is different from the actual inner text of the text editor.

can you explain it more with screenshots or videos that could help me fixing it fast
I don't understand what are you saying

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants