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

Add wrapping/resizing for Freetext annotations #18191

Open
atrinker opened this issue May 30, 2024 · 5 comments · May be fixed by #19345
Open

Add wrapping/resizing for Freetext annotations #18191

atrinker opened this issue May 30, 2024 · 5 comments · May be fixed by #19345
Labels

Comments

@atrinker
Copy link

atrinker commented May 30, 2024

Attach (recommended) or Link to PDF file here:
Using Demo Viewer

Configuration:

  • Web browser and its version: Mozilla
  • Operating system and its version: Windows 10
  • PDF.js version: 4.3.136

Steps to reproduce the problem:

  1. Open demo viewer.
  2. Add a freetext annotation
  3. Enter a long string of text

What is the expected behavior? (add screenshot)
When a freetext annotation begins to spill off page, it should instead wrap to a new line. Ideally, you should be able to resize the freetext container to dictate where the text will begin to wrap.
Screenshot 2024-05-30 at 12-18-28 compressed tracemonkey-pldi-09 pdf

What went wrong? (add screenshot)
freetext annotations can spill off of the page and have portions become unviewable.
Screenshot 2024-05-30 at 12-16-59 compressed tracemonkey-pldi-09 pdf

@kunal-singh-8057
Copy link

Hi I would like to contribute in solving that....

@marco-c
Copy link
Contributor

marco-c commented Jun 17, 2024

@kunal-singh-8057 this might not be the easiest issue to start with, but feel free to pick it up if you want ;)

@shivansh84ya
Copy link

Hi @marco-c ,

I’d like to contribute to resolving the Freetext annotation wrapping and resizing issue. My approach is to modify the text rendering logic to ensure text wraps within the annotation box and to add resize handles to allow dynamic adjustment of the box size. I will also create test cases to ensure these functionalities work across different browsers and documents. Please assign this issue to me.
Thank you!

@marco-c
Copy link
Contributor

marco-c commented Jul 14, 2024

Hello @shivansh84ya, thanks! We will review your PR once ready.

@shivansh84ya
Copy link

Hi @marco-c,
I have successfully raised a PR. If there are any changes needed, please let me know.
Thank you!

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

Successfully merging a pull request may close this issue.

5 participants