Skip to content

QrCommunication/gigapdf

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

344 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

GigaPDF Logo

GigaPDF

The self-hostable WYSIWYG PDF editor — edit text, images and forms in your browser, with a complete REST API.
Open source under AGPLv3.

License: AGPL-3.0-or-later Trademark Protected CI Security Audit GitHub Stars Cloud

Why GigaPDF?Quick StartCloud vs Self-hostingFeaturesContributing


Why GigaPDF?

  • True WYSIWYG editing — Edit text directly in PDFs (not just annotate), thanks to a Fabric.js canvas layered on top of pdfjs-dist with full font re-embedding for accurate output.
  • Self-hostable from day onedocker compose up and you're running. No cloud lock-in, no telemetry, your data stays on your infrastructure.
  • API-first design — Complete REST API (OpenAPI documented) so you can integrate PDF editing into your own apps.

Quick start (self-hosting)

GigaPDF can be self-hosted in two ways: Docker (recommended) or native (bare-metal / VPS).

Option 1 — Docker (recommended)

Prerequisites: Docker 24+ with the Compose plugin.

git clone https://github.com/QrCommunication/gigapdf.git
cd gigapdf
cp .env.example .env             # edit values, especially LEGAL_*
cp apps/web/.env.example apps/web/.env.local
docker compose up -d
# App at http://localhost:3000

The compose stack starts six services:

Service Image / build Port
postgres postgres:17-alpine 5432
redis redis:8-alpine 6379
api FastAPI backend (Dockerfile.api) 8000
celery-worker + celery-beat Background jobs (Dockerfile.api)
web Next.js frontend (Dockerfile.web) 3000
admin Admin dashboard (Dockerfile.admin) 3001

The web image is based on Debian bookworm and already embeds every system dependency the PDF engine needs — no extra setup:

  • LibreOffice (writer/calc/impress/draw) — Office ↔ PDF conversions
  • fontforge — Type1/CFF → TTF conversion for faithful font rendering
  • tesseract-ocr (fra + eng) — OCR
  • Playwright Chromium — HTML → PDF and URL → PDF

⚠️ Self-hosters must configure NEXT_PUBLIC_LEGAL_* env vars in apps/web/.env.local for LCEN compliance. The web app refuses to start in production mode without them. See apps/web/.env.example.

Option 2 — Native (bare-metal / VPS)

Prerequisites:

  • Node.js 24 + pnpm 10.28
  • Python 3.12 + venv (backend API, requirements.txt)
  • PostgreSQL 17 and Redis 8

Install the system dependencies used by the PDF engine (Ubuntu/Debian):

sudo apt-get update
sudo apt-get install -y libreoffice fontforge \
  tesseract-ocr tesseract-ocr-fra tesseract-ocr-eng

Then build and install:

git clone https://github.com/QrCommunication/gigapdf.git
cd gigapdf

# Backend (FastAPI + Celery)
python3.12 -m venv venv && source venv/bin/activate
pip install -r requirements.txt

# Frontend (Next.js web + admin + packages)
pnpm install && pnpm build

# Chromium for HTML → PDF conversions
pnpm exec playwright install --with-deps chromium

Run the services behind a reverse proxy. The repository ships systemd units (deploy/systemd/) and an Nginx configuration (deploy/nginx.conf) whose routing pattern is:

  • /api/pdf/* and /api/auth/*Next.js (:3000, TypeScript PDF engine)
  • /api/*, /socket.io/*, /webhooks/*FastAPI (:8000)
  • /admin → admin dashboard (:3001)
  • everything else → Next.js web (:3000)

See docs/guides/INSTALLATION.md and docs/guides/DEPLOYMENT.md for the full walkthrough.

Cloud vs Self-hosting

Cloud (giga-pdf.com) Self-hosted
Setup Zero config Docker / Kubernetes
Updates Automatic Manual (git pull)
Support Email / SLA Community (GitHub Discussions)
Cost Subscription Free (your infra cost)
Data residency EU (Scaleway, Paris) Wherever you host
Customization Configuration only Full code access

The cloud version is operated by QR Communication SAS. The self-hosted version uses the exact same code base.

Features

PDF Editing

  • Visual WYSIWYG editor — Canvas-based editing with drag-and-drop and professional navigation: native scrolling while zoomed, cursor-anchored Ctrl+wheel zoom, 50–400% presets, Fit page / Fit width (Ctrl+0 / Ctrl+1), Space or middle-click panning
  • Text manipulation — Add, edit, format text (bold, italic, underline, alignment); new text adopts the document's dominant font
  • Faithful fonts — Automatic identification of the PDF's fonts with on-demand Google Fonts download through a server-side proxy (/api/fonts/google, DB + IndexedDB cache, no client request ever reaches Google); the downloaded font is embedded in the final PDF
  • Images & shapes — Insert, resize, position visual elements
  • Annotations — Highlights, comments, stamps, freehand drawings
  • Form designer — Design and fill interactive PDF forms: text, multiline, date, checkbox, radio groups and dropdowns with editable options; required / read-only fields, defaults, max length and tab-order reordering; Design / Fill modes with highlighting of the document's existing fields and flattening after filling
  • Layers & multi-selection — Per-element visibility and locking in a layers panel; batch-edit opacity, colors and alignment across a multi-selection

Document operations

  • Page management (add, remove, reorder, rotate)
  • Merge & split documents
  • Compression with the achieved ratio shown before applying
  • Encryption & password protection
  • Digital signatures (PKCS#7) with your own P12/PFX certificate — processed in memory only, never stored
  • Watermarking (single page or whole document)
  • PDF/A conversion
  • OCR — text extraction from scans (fra+eng default) and "searchable PDF" mode that adds an invisible text layer to image-only pages
  • Conversion (HTML → PDF, URL → PDF via Playwright; Word, Excel, PowerPoint and OpenDocument ↔ PDF via LibreOffice — import .doc/.docx/.xls/.xlsx/.ppt/.pptx/.odt/.ods/.odp, export DOCX/XLSX/PPTX/ODT/ODP)
  • Sharing (email invitations, public links) and document detail page with version history, one-click restore and activity history

Document management

  • Trash with restore — deleted documents are recoverable for 30 days, then purged automatically
  • Tags with filtering and autocomplete
  • Full-text search across document names and content (PostgreSQL tsvector + GIN index)
  • Real thumbnails generated at upload and refreshed after editing
  • Document duplication, folder organization & renaming
  • Parallel uploads (3 concurrent)

Public site & localization

  • Bilingual app — interface in French and English; public pages are served under locale-prefixed URLs (French by default, English under /en/*) with per-page canonical and fr/en/x-default hreflang
  • 32 SEO guide pages (20 PDF tools, 10 professions, 2 hubs) written in both languages with localized slugs and JSON-LD structured data (SoftwareApplication, HowTo, FAQPage)

Developer tools

  • REST API — Complete OpenAPI spec, see docs/api/
  • Webhooks — Document lifecycle events
  • Real-time collaboration — WebSocket-based: live element sync on the canvas, multiple cursors

Architecture

GigaPDF is a pnpm + Turbo monorepo:

apps/
  web/        Next.js 16 frontend + API routes
  admin/      Admin dashboard
  mobile/     Expo / React Native app
packages/
  pdf-engine/ TypeScript PDF processing (pdfjs-dist + pdf-lib + Playwright)
  canvas/     Fabric.js editor canvas
  editor/     React editor components
  embed/      Embeddable widget
  billing/    Stripe integration (optional)
  api/        TypeScript API client
  ui/         Shared UI components (shadcn-based)
  ...

See docs/architecture.md for details.

Contributing

Contributions are welcome! Please:

  1. Read CONTRIBUTING.md
  2. Sign your commits with DCO: git commit -s (every commit, no exceptions)
  3. Read the Code of Conduct

Security

Found a vulnerability? Do not open a public issue. See SECURITY.md for the private reporting process (GitHub Security Advisory or contact@qrcommunication.com).

License & Trademark

GigaPDF has two distinct licensing regimes:

Code: GNU AGPL-3.0-or-later

The source code is licensed under AGPL-3.0-or-later. Any modified version used to provide a network service must publish its source code.

Name & logo: Trademarks of QR Communication SAS

The "GigaPDF" name and logo are trademarks of QR Communication SAS. Forks with code modifications must rebrand entirely (different name, different logo, different domain). See TRADEMARK.md for details. Logo assets are in branding/ under CC-BY-ND 4.0.

About

GigaPDF is built and maintained by QR Communication, a Paris-based company.