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

feat: Support PDF annotation #67

Open
wants to merge 30 commits into
base: main
Choose a base branch
from

Conversation

personalizedrefrigerator
Copy link
Owner

@personalizedrefrigerator personalizedrefrigerator commented Mar 28, 2024

Summary

Adds support for PDF annotation through a new @js-draw/pdf-support package. This package exposes an interface that must be implemented for whichever PDF backend is to be used.

It should be possible to access a built version of the PDF editor example here.

To-do

  • Fix exported text bounding box.
  • Refactor MuPDF-related logic out of docs/examples/pdf-support and into a package that can be published to NPM.
    • Note: MuPDF is licensed under the GNU AGPLv3 — it will need to be made clear that this is the case in the package's README.
  • Better page memory management.
    • Page images should be freed if not recently used.
    • Support caching pages at different zoom levels, perhaps by forcing the use of js-draw's rendering cache?.
  • Support image annotations
  • Support highlight annotations
  • Support searching for PDF text
  • (Optional/follow-up PR) Support selecting PDF text
  • (Optional/follow-up PR) Support links
  • (Optional/follow-up PR) Support form conrols
  • (Optional) More memory-efficient saving of strokes.

Copy link

github-actions bot commented Mar 28, 2024

Visit the preview URL for this PR (updated for commit 5661b19):

https://js-draw--pr67-work-pdf-support-9v0zw3ml.web.app

(expires Mon, 13 Jan 2025 10:46:32 GMT)

🔥 via Firebase Hosting GitHub Action 🌎

Sign: e560ee6f7bb6b79cb55b42fb4c05e9fd1b5c506e

@personalizedrefrigerator personalizedrefrigerator changed the title Support PDF annotation feat: Support PDF annotation Nov 21, 2024
Only a watch command was available.
@personalizedrefrigerator
Copy link
Owner Author

personalizedrefrigerator commented Nov 21, 2024

Direct link to example: https://js-draw--pr67-work-pdf-support-9v0zw3ml.web.app/examples/example-pdf/example.html

personalizedrefrigerator added a commit that referenced this pull request Nov 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: In Progress
Development

Successfully merging this pull request may close these issues.

1 participant