A modern web application for working with PDF files. Merge, split, compress, and convert PDFs to images - all in your browser with no data sent to servers.
- PDF Merger: Combine multiple PDFs into a single document
- PDF Splitter: Extract specific pages from a PDF
- PDF Compressor: Reduce PDF file size
- PDF to Images: Convert PDF pages to high-quality PNG images
-
Build the project:
npm install npm run build
-
The build output will be in the
distdirectory. -
Deploy to Cloudflare Pages:
- Log in to your Cloudflare dashboard
- Go to Pages > Create a project
- Connect your GitHub repository or upload the
distdirectory - Configure the build settings:
- Build command:
npm run build - Build output directory:
dist
- Build command:
- Deploy!
This project includes a GitHub Actions workflow for automatic deployment to Cloudflare Pages.
To set it up:
-
In your Cloudflare dashboard, create an API token with the "Edit Cloudflare Pages" permission.
-
In your GitHub repository settings, add the following secrets:
CLOUDFLARE_API_TOKEN: Your Cloudflare API tokenCLOUDFLARE_ACCOUNT_ID: Your Cloudflare account ID
-
Push to the main branch, and GitHub Actions will automatically deploy to Cloudflare Pages.
# Install dependencies
npm install
# Start development server
npm run dev
# Build for production
npm run build
# Preview production build
npm run preview- React
- TypeScript
- Vite
- Material UI
- PDF.js
- pdf-lib
- Node.js (v18 or higher)
- pnpm (v8 or higher)
-
Clone the repository:
git clone https://github.com/yourusername/pdf-toolkit.git cd pdf-toolkit -
Install dependencies:
pnpm install
-
Start the development server:
pnpm dev
-
Build for production:
pnpm build
- pdf-lib: Core PDF manipulation (creating, modifying, merging, splitting)
- PDF.js: PDF rendering and content extraction
- Compressor.js: Image compression
- FileSaver.js: Saving generated files
- JSZip: Bundling multiple output files
- Material-UI: UI components and styling
- React: UI framework
- TypeScript: Type safety and better developer experience
The application is structured as a single-page application with modular components for each PDF tool:
PDFMerger: Handles combining multiple PDFsPDFSplitter: Manages PDF splitting functionalityPDFCompressor: Handles PDF compressionPDFToImages: Converts PDF pages to images
- All processing is done client-side using Web Workers where available
- Large files are processed in chunks to maintain responsiveness
- Progress indicators for all operations
- Efficient memory management for large PDF files
- Chrome (latest)
- Firefox (latest)
- Edge (latest)
- Safari (latest)
- Fork the repository
- Create your feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add some amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
This project is licensed under the MIT License - see the LICENSE file for details.