Skip to content

Latest commit

 

History

8 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

PDF Converter Website

A modern, responsive website for converting files to and from PDF format, built using HTML, CSS, and JavaScript with Vite as the build tool.

Features

  • 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

Conversion Capabilities

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)

Pricing Structure

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

Technologies Used

  • 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

How It Works

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.

Getting Started

  1. Clone this repository
  2. Install dependencies:
    npm install
    
  3. Start the development server:
    npm run dev
    
  4. For production build:
    npm run build
    
  5. To preview the production build:
    npm run preview
    

Project Structure

  • index.html - Main HTML structure
  • src/styles.css - All CSS styling
  • src/main.js - JavaScript functionality including conversion logic
  • vite.config.js - Vite configuration
  • README.md - Project documentation

Browser Compatibility

This website works best in modern browsers:

  • Chrome (latest)
  • Firefox (latest)
  • Safari (latest)
  • Edge (latest)

Notes

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

License

MIT

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages