A modern, responsive website for converting files to and from PDF format, built using HTML, CSS, and JavaScript with Vite as the build tool.
- Client-side file conversion (no server uploads required)
- Modern, responsive UI with clean design
- Drag and drop file uploading
- Convert various file formats to PDF and vice versa
- File preview functionality
- Download converted files directly
- Freemium model with 2 free conversions
- Subscription options with 7-day free trial
The application provides the following conversion features:
- Image to PDF: Converts JPG/PNG images to PDF while maintaining aspect ratio and image quality
- Text to PDF: Converts plain text files to formatted PDF documents with proper pagination
- PDF to Image: Converts PDF files to JPG images
- PDF to Text: Extracts text content from PDF files
- Document formats (basic placeholders):
- DOCX to PDF (placeholder implementation)
- XLSX to PDF (placeholder implementation)
- PPTX to PDF (placeholder implementation)
The application uses a freemium model:
- Free tier: 2 free conversions
- Pro Plan: $4.99/week for unlimited conversions
- Free Trial: 7 days free access to all premium features, then $4.99/week
- HTML5 for structure
- CSS3 for styling (with CSS variables and flexbox/grid layouts)
- Vanilla JavaScript for functionality
- Vite for fast development and optimized builds
- PDF.js for PDF rendering, parsing and extraction
- jsPDF for PDF generation
- Canvas API for image processing and PDF-to-image conversion
- Font Awesome for icons
- LocalStorage for user data persistence
This PDF converter runs entirely in the browser using client-side JavaScript. The conversion is done using:
- jsPDF for generating PDFs from various formats
- PDF.js for reading and parsing existing PDFs
- Canvas API for image manipulation and rendering PDF pages
- FileReader API for reading file contents
- Blob API for creating downloadable files
- LocalStorage API for persisting user conversion count and subscription status
All processing happens directly in the browser, no data is sent to any server.
- Clone this repository
- Install dependencies:
npm install - Start the development server:
npm run dev - For production build:
npm run build - To preview the production build:
npm run preview
index.html- Main HTML structuresrc/styles.css- All CSS stylingsrc/main.js- JavaScript functionality including conversion logicvite.config.js- Vite configurationREADME.md- Project documentation
This website works best in modern browsers:
- Chrome (latest)
- Firefox (latest)
- Safari (latest)
- Edge (latest)
For more robust document conversion (DOCX, XLSX, PPTX), consider integrating:
- Mammoth.js for DOCX to HTML conversion
- SheetJS for Excel file parsing
- html2pdf for converting HTML to PDF
- Or a backend service for handling more complex conversions
MIT