A free, client-side PDF editor that allows users to upload, edit, fill forms, and download PDFs directly in their browser. No server uploads required - all processing happens locally on your device.
π Built with Love: This PDF editor was created by Emlyn O'Regan for Jodie O'Regan, demonstrating the power of modern web technologies for secure, client-side document processing. Vibe coded using Cursor & Claude-4-Sonnet for a perfect blend of AI-assisted development and human creativity!
β Latest Update: All major functionality has been implemented and tested. The app now supports complete PDF upload, editing, form filling, and persistent storage workflow with robust error handling.
- π PDF Upload & Management: Upload multiple PDF files with drag-and-drop support
- π Form Filling: Fill out PDF forms with automatic saving and loading of field values
- πΎ Dual Storage System: IndexedDB primary storage with localStorage fallback
- β¬οΈ Download: Download completed PDFs with filled-in forms
- π PDF Viewer: View PDFs with zoom controls and page navigation
- π± Responsive Design: Works seamlessly on desktop, tablet, and mobile devices
- π PWA Support: Install as a Progressive Web App (service worker currently disabled)
- π Privacy First: All processing happens in your browser - no data sent to servers
- π‘οΈ Robust Error Handling: Comprehensive error handling with fallback mechanisms
- π Auto-Save: Form field values are automatically saved as you type
- π Storage Management: Monitor storage usage and manage uploaded PDFs
- Clone or download the repository
- Navigate to the
pdfeditordirectory - Run the development server:
python run_game.py
- Open your browser to
http://localhost:8000 - Upload a PDF with form fields to test the functionality
- Upload the
pdfeditordirectory to your GitHub repository - Enable GitHub Pages in repository settings
- Select the branch containing the
pdfeditordirectory - Your PDF editor will be available at
https://yourusername.github.io/repository-name/pdfeditor/
pdfeditor/
βββ index.html # Main HTML file with cache-busting (v=1737022700)
βββ run_game.py # Local development server with custom headers
βββ manifest.json # PWA configuration
βββ sw.js # Service worker (currently minimal/disabled)
βββ css/
β βββ style.css # Main styles and responsive design
β βββ pdf-editor.css # PDF editor specific styles
βββ js/
β βββ storage.js # IndexedDB/localStorage dual storage system
β βββ pdf-handler.js # PDF processing, rendering, and form handling
β βββ ui-manager.js # UI interactions, modals, and view management
β βββ main.js # Application initialization and coordination
βββ assets/
β βββ images/
β βββ favicon.png # App icon
β βββ oembed.png # Social media preview image
βββ README.md # This file
- Frontend: HTML5, CSS3, JavaScript (ES6+)
- PDF Processing:
- Storage:
- Primary: IndexedDB with structured object stores
- Fallback: localStorage with JSON serialization
- Form Data: Persistent form field values with timestamps
- Architecture:
- Modular class-based JavaScript
- Event-driven UI management
- Async/await pattern throughout
- Development: Python HTTP server with cache-control headers
- Cache Management: URL-based cache busting (current version: v=1737022700)
- Click "Choose PDF Files" or drag and drop PDF files onto the upload area
- Files are processed and stored locally in IndexedDB (or localStorage fallback)
- Multiple files can be uploaded simultaneously
- Upload progress and error states are clearly indicated
- View all uploaded PDFs in the clean management interface
- See detailed file information (size, pages, form fields count, upload date)
- Delete individual files or clear all storage
- Monitor storage usage and remaining space
- Click "Edit" on any PDF to open the full-screen editor
- Navigate pages with intuitive controls
- Zoom in/out for detailed editing
- Form Filling:
- Fill form fields using the right-side panel
- Values are auto-saved as you type
- Field values persist between sessions
- Supports text fields, checkboxes, radio buttons, and dropdowns
- Click "Download PDF" to save the completed form
- Downloaded PDF includes all your filled form data
- Original PDF remains unchanged in storage
- Form field values are preserved for future editing
- Double Dialog Issue: Fixed duplicate file upload dialogs caused by event listener conflicts
- Storage Errors: Resolved undefined PDF object errors with comprehensive null checks
- Form Field Persistence: Implemented complete save/load system for form field values
- Cache Conflicts: Simplified caching strategy, disabled problematic service worker
- Missing Methods: Added all required storage methods (saveFormFieldValues, loadFormFieldValues)
- View Management: Fixed app initialization to show appropriate view based on existing PDFs
- Error Handling: Added try-catch blocks and fallback mechanisms throughout
- β PDF Upload: Working with drag-and-drop and file selection
- β PDF Management: List view with file details and storage info
- β PDF Editor: Full-screen editing with zoom and navigation
- β Form Filling: Complete form field editing with auto-save
- β Data Persistence: IndexedDB primary with localStorage fallback
- β Error Recovery: Graceful handling of storage failures and corrupted data
Database: PDFEditor
βββ pdfs (Object Store) # PDF files and metadata
β βββ id (keyPath) # Unique PDF identifier
β βββ filename # Original filename
β βββ uploadDate # ISO timestamp
β βββ size # File size in bytes
β βββ blob # PDF file data
βββ formFields (Object Store) # Form field values
βββ pdfId (index) # Links to PDF
βββ fieldName # Form field identifier
βββ value # Field value
βββ updatedAt # Last modification timeKeys:
βββ pdfeditor_pdfs # JSON array of PDF metadata
βββ pdfeditor_pdf_{id} # Individual PDF blob data (base64)
βββ pdfeditor_form_{id} # Form field values for PDFCurrent Status: PWA features available but service worker is simplified to avoid caching conflicts.
- Visit the app in a compatible browser
- Look for browser's "Install" prompt
- App will be available offline for core functionality
- Manifest: App metadata and icon configuration
- Responsive: Works across all device sizes
- Offline Core: Basic functionality available without internet
- App-like: Standalone mode when installed
- Python 3.x for local development server
- Modern web browser with JavaScript enabled
- PDF files with form fields for testing
- Make changes to HTML, CSS, or JavaScript files
- Update cache version in
index.htmlif needed (incrementv=parameter) - Refresh browser to see changes (cache-busting ensures updates are loaded)
- Use browser developer tools for debugging
- Test with various PDF files to ensure compatibility
- Upload multiple PDFs of different sizes
- Fill form fields and verify auto-save
- Close and reopen app to test persistence
- Test both IndexedDB and localStorage modes
- Verify error handling with corrupted data
- Test responsive design on mobile devices
- New Form Field Types: Extend
PDFHandler.processFormField() - UI Improvements: Modify CSS files and
UIManagerclass methods - Storage Features: Enhance
StorageManagerwith new object stores - PDF Processing: Utilize additional PDF.js and PDF-lib APIs
PDF Won't Load
- Ensure PDF is not password-protected
- Check file size (default limit: ~50MB in IndexedDB)
- Verify PDF file is not corrupted
- Check browser console for specific error messages
Form Fields Not Detected
- PDF must contain interactive form fields (not just fillable text)
- Try with known form PDFs (government forms work well)
- Some scanned PDFs may not have interactive fields
Storage Issues
- App automatically falls back to localStorage if IndexedDB fails
- Clear browser storage if encountering persistent errors
- Check available storage space in browser settings
App Shows Upload Screen Despite Having PDFs
- This was a known issue that has been fixed
- Refresh the page to trigger proper view initialization
- Check browser console for any remaining errors
Service Worker Conflicts
- Service worker is currently simplified to avoid caching issues
- If experiencing caching problems, disable service worker in dev tools
- Hard refresh (Ctrl+F5) to bypass all caches
- Chrome: Full support including PWA and IndexedDB
- Firefox: Full support, comprehensive form field handling
- Safari: Full support on iOS 14.3+, excellent mobile experience
- Edge: Full support including all modern features
- Mobile Browsers: Responsive design optimized for touch interfaces
- IndexedDB: Supported in all modern browsers
- localStorage: Universal fallback support
- File API: Required for PDF upload functionality
- Fork the repository
- Create a feature branch (
git checkout -b feature/new-feature) - Make your changes and test thoroughly
- Update cache version in index.html if JS/CSS changes are made
- Test with various PDF files and edge cases
- Commit your changes (
git commit -am 'Add new feature') - Push to the branch (
git push origin feature/new-feature) - Create a Pull Request
- Current cache version:
v=1737022700 - Service worker is intentionally minimal
- All storage methods include error handling and fallbacks
- Form field values are saved with timestamps for future features
This project is open source and available under the MIT License. See the LICENSE file for more details.
- PDF.js - Mozilla's excellent PDF rendering library
- PDF-lib - Powerful PDF manipulation library for form filling
- IndexedDB API - For reliable client-side storage
- Modern Web Standards - Making client-side PDF processing possible
- Lazy Loading: PDF pages rendered on demand
- Memory Management: Efficient blob storage and retrieval
- Async Operations: Non-blocking UI with proper error handling
- Cache Busting: Ensures users get latest application updates
- Client-Side Only: No data transmission to external servers
- Same-Origin Policy: All resources served from same domain
- Content Security: No external script dependencies
- Local Storage: Data never leaves user's device
- IndexedDB: Typically 50% of available disk space
- localStorage: Usually 5-10MB limit
- Auto-Fallback: Seamless switching between storage methods
Status: β
Production Ready - All core functionality implemented and tested
Last Updated: January 2025
Version: v1737022700
For support or questions, please open an issue in the repository.