A modern web application for merging multiple PDF pages onto single sheets, built for students and professionals who want to optimize their printing.
|
|
Core Features
- π Smart PDF Combining - Merge 2, 3, 4, or 6 pages per sheet
- π¨ Visual Customization - Apply grayscale, color inversion, and background options
- π― Quality Control - Adjustable DPI settings (150-300 DPI) for perfect print quality
- π Drag & Drop Interface - Intuitive file management with reordering capabilities
- βοΈ Real-time Processing - Instant preview and processing feedback
Privacy & Security
- π‘οΈ Privacy First - All processing happens locally in your browser
- π« No Uploads - Your files never leave your device
- β Secure - No server-side storage or data collection
- π Offline Ready - Works without internet connection when installed
Progressive Web App
- π± Install on Any Device - Works on desktop, mobile, and tablet
- π App-like Experience - Native feel with smooth animations
- π Background Processing - Continue processing when switching tabs
- π Smart Notifications - Get notified when processing completes
- π΄ Offline Support - Use the app without internet connection
Clean, modern interface for uploading PDF files |
Intuitive controls for configuring PDF settings |
Responsive design optimized for mobile devices and touch interactions
Prerequisites
- Node.js 18+ or Bun runtime
- Modern web browser with PDF support (Chrome, Firefox, Safari, Edge)
# Clone the repository
git clone https://github.com/mosaddiqdev/onepdf.git
cd onepdf
# Install dependencies
bun install
# or npm install
# Set up environment variables
cp .env.example .env.local
# Start development server
bun run dev
# or npm run dev
# Open your browser
# http://localhost:3000Configuration Options
Environment variables can be configured in .env.local:
# File size limits (in MB)
NEXT_PUBLIC_MAX_FILE_SIZE=50
NEXT_PUBLIC_MAX_TOTAL_SIZE=200
# Processing limits
NEXT_PUBLIC_MAX_FILES=20
NEXT_PUBLIC_MAX_PAGES_PER_FILE=500
# Timeout settings (in milliseconds)
NEXT_PUBLIC_PROCESSING_TIMEOUT=1800000
NEXT_PUBLIC_FILE_LOAD_TIMEOUT=60000| π» Look for the install icon in your browser's address bar | π± Use "Add to Home Screen" from your browser menu | π₯οΈ The app will prompt you to install after 30 seconds |
| Category | Technology | Purpose |
|---|---|---|
| Framework | Next.js 16 | React framework with App Router |
| Language | TypeScript | Type-safe JavaScript |
| Styling | Tailwind CSS 4 | Utility-first CSS framework |
| PDF Processing | PDF-lib | PDF manipulation library |
| PDF Rendering | PDF.js | Mozilla's PDF rendering engine |
| Animations | Framer Motion | Smooth animations and transitions |
| File Upload | React Dropzone | Drag & drop file upload |
| Notifications | Sonner | Beautiful toast notifications |
Project Structure
onepdf/
βββ app/ # Next.js App Router
β βββ combine/ # PDF combining page
β βββ layout.tsx # Root layout with PWA setup
β βββ page.tsx # Landing page
βββ components/ # React components
β βββ combine/ # Combine-specific components
β βββ ui/ # Reusable UI components (shadcn/ui)
β βββ pwa/ # PWA components & install prompts
βββ hooks/ # Custom React hooks
β βββ use-processing.ts # PDF processing logic
β βββ use-file-manager.ts # File management
β βββ use-background-notifications.ts # PWA notifications
βββ lib/ # Utility functions & core logic
β βββ pdf-processor.ts # Main PDF processing engine
β βββ pdf-render.worker.ts # Web Worker for background processing
β βββ validation.ts # Input validation & sanitization
β βββ utils.ts # General utilities
βββ public/ # Static assets
βββ icons/ # PWA icons & favicons
βββ images/ # Screenshots & showcase images
βββ pdfjs/ # PDF.js worker & WASM files
Vercel (Recommended)
- Push your code to GitHub
- Connect your repository to Vercel
- Deploy automatically on every push
Other Deployment Options
- Netlify - Connect GitHub repo for automatic deployments
- Docker - Use the included Dockerfile for containerized deployment
- Self-hosted - Deploy on any Node.js hosting provider
See DEPLOYMENT.md for detailed instructions.
We welcome contributions from the community!
| π Found an issue? Let us know! | π‘ Have an idea? We'd love to hear it! | π€ Want to contribute code? Awesome! |
How to Contribute
- Fork the project
- Create your feature branch (
git checkout -b feature/AmazingFeature) - Commit your changes (
git commit -m 'Add some AmazingFeature') - Push to the branch (
git push origin feature/AmazingFeature) - Open a Pull Request
This project is licensed under the MIT License - see the LICENSE file for details.
- Raghav Sharma - Reported critical background processing bug that led to implementing Web Worker architecture for uninterrupted PDF processing.
- Almas - Identified JPEG 2000 rendering issues with black/corrupted images, leading to implementation of proper WASM support for OpenJPEG decoding in PDF.js.
Website β’ Report Bug β’ Request Feature β’ Discussions
Built for students who print lecture notes

