mozilla / pdf.js

PDF Reader in JavaScript
https://mozilla.github.io/pdf.js/
Apache License 2.0
47.06k stars 9.81k forks source link

Add wrapping/resizing for Freetext annotations #18191

Open atrinker opened 4 weeks ago

atrinker commented 4 weeks ago

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

Configuration:

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 commented 2 weeks ago

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

marco-c commented 1 week ago

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