Skip to content

Repository files navigation

PageSplit

PageSplit is a private, browser-based PDF splitter. It turns every page of a PDF into a separate PDF file and lets the user download individual pages or one ZIP archive.

The application is fully static. PDF parsing, page extraction, and ZIP generation happen locally in a Web Worker in the user's browser. Files are never uploaded to a server.

Features

  • Drag-and-drop and file picker input
  • Local PDF validation and processing with pdf-lib
  • One downloadable PDF per source page
  • ZIP archive generation with JSZip
  • Responsive Polish and English interface
  • Automatic browser-language detection with a remembered manual override
  • Automatic light/dark theme detection with a remembered manual override
  • Progress feedback, errors, and accessible controls
  • Static Vite production output suitable for Cloudflare Pages

Local development

Requirements:

  • Node.js 20 or newer
  • npm

Install dependencies and start the development server:

npm install
npm run dev

Open the local URL shown by Vite.

Quality checks

npm run lint
npm run build

The production build is written to dist.

Deployment to Cloudflare Pages

The workflow in .github/workflows/deploy-cloudflare-pages.yml deploys the application after every push to main and can also be started manually with workflow_dispatch.

Before the first deployment:

  1. Create a Cloudflare Pages project. The workflow uses pagesplit as the placeholder project name. Change --project-name=pagesplit in the workflow if your project has a different name.
  2. Add these repository secrets in GitHub under Settings → Secrets and variables → Actions:
    • CLOUDFLARE_API_TOKEN — a Cloudflare API token with permission to deploy Pages projects.
    • CLOUDFLARE_ACCOUNT_ID — the Cloudflare account ID that owns the Pages project.
  3. Push to main or run the workflow manually from the Actions tab.

The workflow runs npm ci, builds the project with npm run build, and publishes the static dist directory through cloudflare/wrangler-action. No Node.js runtime, server API, or backend is required after deployment.

For a direct Cloudflare Pages configuration outside GitHub Actions, use:

  • Build command: npm run build
  • Build output directory: dist

Privacy and browser support

PageSplit does not send files over the network. Processing stays within the current browser tab. Modern browsers with Web Worker, Blob, and URL.createObjectURL support are recommended.

About

PageSplit is a privacy-friendly browser tool that splits PDF files into individual pages while keeping your documents securely on your device

Topics

Resources

Stars

2 stars

Watchers

0 watching

Forks

Sponsor this project

Contributors

Languages