A modern, feature-rich PDF reader and annotation tool built with React and TypeScript. This application provides a professional reading experience with support for annotations, notes, and seamless document management.
- Multiple Input Sources: Upload PDF files or load from URLs
- Thumbnail Navigation: Visual page previews for quick navigation
- File Information: Display document name and source type
- Responsive Layout: Three-panel design with resizable sections
- Zoom Controls: Adjustable zoom levels (0.2x to 3x)
- Page Navigation: Easy page-by-page navigation with keyboard shortcuts
- Full-Screen Mode: Distraction-free reading experience
- Text Selection: Select any text portion to add notes
- Note Creation: Add detailed notes to selected text with position tracking
- Note Management: View, edit, and delete annotations
- Page-Specific Notes: Filter notes by current page
- Persistent Storage: Notes are saved locally and persist between sessions
- Modern Design: Clean, intuitive interface built with Tailwind CSS
- Responsive Panels: Resizable thumbnail, viewer, and notes panels
- Visual Feedback: Hover effects and smooth transitions
- Professional Icons: Lucide React icons for consistent visual language
- Node.js (v16 or higher)
- pnpm package manager
-
Clone the repository
git clone https://github.com/your-username/pdf-reader-app.git cd pdf-reader-app -
Install dependencies
pnpm install
-
Start development server
pnpm dev
-
Open your browser Navigate to
http://localhost:5173
# Build the application
pnpm build
# Preview the production build
pnpm previewFrom Local File:
- Click the "Choose PDF File" button
- Select a PDF file from your device
- The document will load automatically
From URL:
- Enter the PDF URL in the input field
- Click the "Load" button
- The document will be fetched and loaded
- Thumbnail Panel: Click on any page thumbnail to navigate
- Navigation Controls: Use previous/next buttons or keyboard arrows
- Page Indicator: Shows current page and total pages
- Select Text: Click and drag to highlight text in the PDF
- Add Note: A modal will appear automatically
- Enter Note: Type your annotation text
- Save: Click "Save Note" to create the annotation
- View Notes: All annotations appear in the right panel
- Navigate to Note: Click on any note to jump to its location
- Edit Note: Click the edit button to modify note text
- Delete Note: Click the delete button to remove an annotation
- Zoom In: Click the magnifying glass with + icon
- Zoom Out: Click the magnifying glass with - icon
- Reset View: Click the maximize icon to reset zoom
- React 18: Modern React with hooks and concurrent features
- TypeScript: Type-safe development with full IntelliSense support
- Vite: Fast build tool and development server
- Tailwind CSS: Utility-first CSS framework for styling
- react-pdf: PDF rendering and interaction
- react-resizable-panels: Draggable panel resizing
- lucide-react: Modern icon library
- uuid: Unique identifier generation for notes
src/
โโโ components/ # React components
โ โโโ FileUpload.tsx # File upload functionality
โ โโโ ThumbnailPanel.tsx # Page navigation thumbnails
โ โโโ PdfViewer.tsx # Main PDF display component
โ โโโ NotesPanel.tsx # Annotations management
โ โโโ NoteModal.tsx # Note creation/editing modal
โ โโโ ErrorBoundary.tsx # Error handling
โโโ types/
โ โโโ pdf.ts # TypeScript type definitions
โโโ lib/
โ โโโ storage.ts # Local storage utilities
โโโ App.tsx # Main application component
โโโ main.tsx # Application entry point
- Notes are stored in browser's
localStorage - Each note includes:
- Unique identifier
- Page number and text selection
- Position coordinates for highlighting
- Timestamp for tracking
- Custom annotation text
Try the live demo: https://pdf-annotator.pages.dev/
# Start development server
pnpm dev
# Build for production
pnpm build
# Run ESLint
pnpm lint
# Preview production build
pnpm previewContributions are welcome! Please feel free to submit a Pull Request.
- Follow existing code style and patterns
- Use TypeScript for type safety
- Test thoroughly before submitting
- Update documentation as needed
This project is licensed under the MIT License - see the LICENSE file for details.
- Originally generated by minimax agent and subsequently enhanced
- Built with modern web technologies and best practices
- Inspired by professional PDF reading applications
- Export annotations to different formats
- Support for PDF bookmarks and outlines
- Dark mode theme
- Highlight colors and styles
- Search functionality within documents
- Cloud storage integration
- Collaboration features
- Drawing and sketching tools
- Document printing and export options