$ account Submitty
pdf-annotate.js is a JavaScript library that provides an annotation layer for PDF.js, enabling users to add various types of annotations (highlight, underline, strikethrough, freehand drawing, text boxes, points, shapes) to PDF documents. The library features a modular architecture with separate concerns for UI interactions, rendering, storage adapters, and accessibility. It integrates with PDF.js to render PDF pages and overlays annotation SVGs, handling coordinate transformations that account for viewport scaling and rotation. The library provides a storage adapter pattern for persisting annotations (with implementations for localStorage), comprehensive UI components for annotation creation and editing, and accessibility features for screen reader users through clever DOM manipulation techniques.