A local web app for converting, merging, splitting, and compressing PDFs.
- PDF → PNG — Convert each page of a PDF to a PNG image at a configurable DPI (72–600). Runs entirely in-browser or via the server. Downloads a ZIP per file, or convert all at once into a single ZIP.
- Merge PDFs — Drop in multiple PDFs, drag them into the order you want, then merge into a single file.
- PNG → PDF — Pack one or more PNG images into a single PDF document.
- Split PDF — Extract pages by range, individual page list, or target file size. Downloads results as a ZIP.
- Compress PDF — Reduce PDF file size with selectable compression levels, powered by Ghostscript.
-
Node.js 18+
-
Ghostscript — required for the Compress PDF feature
OS Install command macOS brew install ghostscriptWindows Download installer from ghostscript.com Linux sudo apt install ghostscript
git clone https://github.com/dpluscec/pdf2png.git
cd pdf2png
npm install
npm run dev- Frontend: http://localhost:5173
- API server: http://localhost:3001
| Layer | Tech | Entry point |
|---|---|---|
| Frontend | React 18, TypeScript, Vite | src/main.tsx |
| Backend | Express, TypeScript, tsx | server/index.ts |
The PDF → PNG tab converts entirely in-browser using pdfjs-dist — no server round-trip unless you select "Server" mode. All other operations (merge, split, compress, PNG → PDF) call the Express API at /api/*.
| Command | Description |
|---|---|
npm run dev |
Start frontend + backend together |
npm run build |
Production Vite build |
npm test |
Run tests (Vitest) |
npm run type-check |
TypeScript check (client + server) |
