Skip to content

Add more annotation tools to edit mode (text, drawings) #12

@roiguri

Description

@roiguri

Request

Expand the edit mode toolbar with additional annotation tools beyond the current highlight and signature options.

Proposed Tools

  • Text box — place a resizable text annotation directly on the PDF page
  • Freehand drawing — pen/pencil tool for freehand markup
  • Shapes — rectangle, ellipse, arrow overlays
  • Sticky note — small collapsible comment anchored to a page position

Current Architecture

The edit toolbar is in src/components/pdf/EditToolbar.tsx. New tool types would need to be added to:

  • AnnotationType union in src/store/slices/annotationSlice.ts
  • src/components/pdf/AnnotationOverlay.tsx — rendering and interaction logic per type
  • src/components/pdf/EditToolbar.tsx — toolbar buttons
  • src/lib/pdf-utils.tsembedAnnotationsInPdf export logic for each new type

Notes

  • Each tool should support drag-to-reposition and delete (already handled generically in DraggableAnnotation)
  • Text boxes should support inline editing on double-click
  • Export (embedAnnotationsInPdf) must embed new annotation types into the PDF bytes using pdf-lib

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions