Skip to content

martinmeinke/pdf-sam

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

PDF Sam - PDF Page Manager

A client-side web application for managing and rearranging PDF pages. Upload multiple PDFs, rearrange or delete pages, and export as a new combined PDF.

Live Demo Created with Claude GitHub

Live Demo

This application is hosted at: https://pdf-rearrange.netlify.app

Features

  • 📁 Select one or multiple PDF files
  • 👁️ Preview all PDF pages
  • 🔀 Drag and drop to rearrange pages
  • 🗑️ Delete unwanted pages
  • 💾 Export as a new combined PDF
  • 🔒 Client-side processing (no files are uploaded to a server)

Technology Stack

  • React.js with Vite
  • PDF.js for PDF rendering
  • PDF-Lib for PDF manipulation
  • Material UI for the interface
  • React DnD for drag-and-drop functionality

Development

  1. Install dependencies:

    npm install
    
  2. Start the development server:

    npm run dev
    
  3. Build for production:

    npm run build
    

Deployment

This app can be easily deployed to various static hosting platforms:

Netlify

# Install Netlify CLI if needed
npm install -g netlify-cli

# Build the app
npm run build

# Deploy to Netlify
netlify deploy --prod --dir=dist

GitHub Pages

  1. Add the GitHub Pages workflow file to .github/workflows/deploy.yml:
name: Deploy to GitHub Pages

on:
  push:
    branches: [ main ]
  workflow_dispatch:

permissions:
  contents: read
  pages: write
  id-token: write

jobs:
  build:
    runs-on: ubuntu-latest
    steps:
      - name: Checkout
        uses: actions/checkout@v3
      - name: Setup Node
        uses: actions/setup-node@v3
        with:
          node-version: '18'
      - name: Install dependencies
        run: npm ci
      - name: Build
        run: npm run build
      - name: Upload artifact
        uses: actions/upload-pages-artifact@v1
        with:
          path: './dist'
          
  deploy:
    environment:
      name: github-pages
      url: ${{ steps.deployment.outputs.page_url }}
    runs-on: ubuntu-latest
    needs: build
    steps:
      - name: Deploy to GitHub Pages
        id: deployment
        uses: actions/deploy-pages@v2
  1. Enable GitHub Pages in your repository settings.

Vercel, Cloudflare Pages, etc.

Most modern hosting platforms can automatically deploy this app by connecting to the GitHub repository.

Usage

  1. Click "Select PDFs" to choose one or more PDF files
  2. View the thumbnails of all pages
  3. Drag and drop to rearrange pages
  4. Click the trash icon to delete pages
  5. Click "Export PDF" to download the final document

Privacy

All processing happens locally in your browser. Your PDF files are never uploaded to any server.

About

This application was created using Claude AI as part of an experiment in AI-assisted web development. The entire codebase was generated by Claude, with human guidance on requirements and adjustments.

About

A client-side web application for managing and rearranging PDF pages with drag-and-drop functionality

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published