Skip to content
/ TuPDF Public

Browser-based PDF toolkit, allows for fast organize, split, merge, convert, and optimize operations.

Notifications You must be signed in to change notification settings

lunagus/TuPDF

Repository files navigation

📃 TuPDF

Next.js React TypeScript MUI i18next pdf-lib PDF.js


🚀 Overview

TuPDF is a lightweight, open-source PDF toolkit designed for modern browsers.
All operations — from splitting to optimizing — run entirely on the client using Web APIs, ensuring speed, privacy, and zero server dependencies.


✨ Features

🧩 Split PDFs

Easily divide a PDF into multiple files:

  • Extract specific page ranges or individual pages.
  • Split every page into separate files with one click.
  • Preview pages before splitting, ensuring precise extraction.
  • Client-side splitting — no data leaves your browser.

🔗 Merge PDFs

Combine multiple PDFs into one clean document:

  • Upload, reorder, and preview files before merging.
  • Merge seamlessly using pdf-lib, preserving quality and metadata.
  • Drag-and-drop interface for intuitive document organization.
  • No upload limits, as everything runs locally.

🗂️ Organize Pages

Visually edit your PDF structure:

  • Rearrange, rotate, or delete pages using a responsive grid view.
  • Instant visual feedback with live thumbnails (powered by PDF.js).
  • Perfect for cleaning up scans or reordering reports before submission.

🖼️ Convert Pages to Images

Transform your PDFs into image files for sharing or web use:

  • Export as PNG or JPG.
  • Multi-page PDFs automatically bundled into a ZIP.
  • Adjustable DPI and scaling options (in development).
  • Great for previews, thumbnails, and online document sharing.

⚙️ Optimize & Compress

Reduce file size without losing clarity:

  • Smart compression balancing image quality and file weight.
  • Ideal for email attachments or web uploads.
  • Preview before and after compression.
  • Runs entirely in your browser, preserving confidentiality.

📱 Responsive, Modern UI

Designed with accessibility and usability in mind:

  • Mobile-first layout with adaptive drawer and sticky toolbar.
  • Dark-mode available, choose between two different styles.
  • Built with MUI (Material UI) for a clean, consistent design.
  • Keyboard and touch support for effortless use across devices.

🌍 Full Internationalization (i18n)

Seamlessly localized experience:

  • UI available in 8 languages (English, Spanish, French, German, Chinese, Hindi, Portuguese, Italian).
  • Automatic locale detection with persistence via localStorage.
  • Easy to contribute new translations through locales/<lang>/common.json.

🔒 100% Privacy-Friendly

Your documents never leave your computer:

  • All operations — from upload to export — happen entirely client-side.
  • No servers, APIs, or cloud processing.
  • Built with privacy-by-design, suitable for sensitive documents and offline use.

⚡ Performance-Focused

Optimized for large PDFs and fast rendering:

  • Leverages Web Workers and efficient memory handling.
  • Incremental rendering with PDF.js for smooth previews.
  • Tested on files exceeding 100 MB for stability and performance.

🧠 Tech Stack

Layer Technology
Framework Next.js + React
Language TypeScript
UI Components MUI (Material UI)
Internationalization i18next + react-i18next
PDF Processing pdf-lib for editing, PDF.js for rendering

🌐 Supported Languages

Code Language
en English
es Español
de Deutsch
fr Français
zh 中文
hi हिन्दी
pt Português
it Italiano

⚙️ Getting Started

Prerequisites

  • Node.js ≥ 18
  • Package manager: npm, pnpm, or yarn

Installation

# Using npm
npm install

# Or using pnpm
pnpm install

# Or using yarn
yarn

## Getting started
### Prerequisites
- Node.js 18+ and pnpm/npm/yarn

### Install
```bash
# using npm
npm install
# or with pnpm
pnpm install
# or with yarn
yarn

Development

npm run dev
# http://localhost:3000

Production build

npm run build
npm start

🗂️ Project Structure

  • app/ Next.js app routes (merge, split, organize, convert, optimize, recent, settings)
  • components/ UI and feature components
    • layout/main-layout.tsx Drawer sidebar + top bar
    • pdf/ PDF upload, page selector, preview
    • feature workspaces under merge/, split/, organize/, convert/, optimize/
  • locales/<lang>/common.json i18n dictionaries
  • lib/i18n.ts i18next config and locale utilities

🌍 Internationalization

  • Default locale is auto-detected and saved in localStorage.
  • Add/modify strings under locales/<lang>/common.json.
  • Use const { t } = useTranslation() and call t("namespace.key") in components.

⚠️ Notes

  • PDF work happens client-side; large files may be memory-intensive in the browser.
  • Some locales may fall back to English for missing strings; contributions welcome.

About

Browser-based PDF toolkit, allows for fast organize, split, merge, convert, and optimize operations.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published