Frontend Documentation

The frontend is a React-based single-page application that provides an intuitive interface for PDF operations.

Components

App.tsx

Main application component that manages:

  • Tool selection state
  • File upload state
  • Processing state and results
  • Navigation between tools

ToolSelector.tsx

Grid display of available PDF tools:

  • Merge PDFs
  • Split PDF
  • PDF to Images
  • Images to PDF
  • Compress PDF
  • PDF Info
  • Password Protect
  • Rotate Pages

FileUpload.tsx

Handles file upload and processing options:

  • Drag & drop file upload
  • File validation
  • Tool-specific options (split pages, rotation angle, etc.)
  • Processing button and status

Features

File Upload

  • Drag and drop support
  • Multiple file selection for merge/images-to-pdf
  • File type validation
  • File size display
  • Remove individual files

Tool-Specific Options

  • Split: Page selection or range specification
  • Rotate: Angle selection and page targeting
  • Protect: Password input
  • PDF to Images: Format and quality selection

Processing

  • Visual feedback during processing
  • Error handling and display
  • Download links for processed files
  • PDF information display

Styling

  • TailwindCSS for utility-first styling
  • Custom CSS for animations and transitions
  • Responsive design for mobile and desktop
  • Hover effects and visual feedback

File Handling

  • Browser File API for client-side file handling
  • FormData for server communication
  • Blob URLs for download links
  • Automatic cleanup of object URLs