Source Printer turns a zip full of student coding projects into syntax-highlighted PDFs. It parses the zip in the browser for preview, then sends the zip and settings to a stateless Node backend that renders PDFs and streams the download. Any programming language with a recognized file extension is supported.
- Docker image: https://hub.docker.com/r/haanlaurent/sourceprinter
- Upload a zip containing multiple top-level project folders.
- Configure the project folder level when the zip nests projects deeper.
- Supports 40+ file extensions:
.java,.py,.js,.ts,.c,.cpp,.cs,.go,.rs,.rb,.php,.swift,.kt,.scala, and many more. - Parse embedded
.umzarchives (created by Unimozer Next) inside the uploaded zip (one nesting level; nested.umzinside.umzare ignored). - Ignore hidden/macOS metadata files (for example entries under
__MACOSXand files whose basename starts with.). - Overview grouped by project, sorted by project then file name.
- Preview with adjustable font size, line height, color scheme, and font family.
- Language-agnostic filters: remove comments, collapse blank lines, tabs to spaces.
- Language-specific filters shown dynamically based on detected languages (e.g. Java: Remove Javadoc, Hide initComponents(), Hide main()).
- Per-file include checkboxes with preview selection.
- Output as a single PDF or a zip of per-project PDFs, with optional per-project page padding.
- Optional headers (project and file name/full path) and footer page numbers.
- Render progress with a live radial indicator (per-file progress).
- Highlighting via highlight.js with built-in themes: atom-one-light, arduino-light, stackoverflow-light, vs, monochrome.
- Settings persist in localStorage with a reset-to-defaults action.
- No files retained on the server (temp files are deleted after each request).
For local development or a direct Node.js deployment, use Node.js 22.23.4+, 24.22.1+, or 26.12.1+ within those major versions. These minimum versions include the CVE-2026-111497 Brotli decoder fix. Dependency installation and backend startup reject older or unsupported runtimes.
Run the latest published image from Docker Hub: https://hub.docker.com/r/haanlaurent/sourceprinter
docker run --rm -p 8080:8080 haanlaurent/sourceprinter:latestThen open: http://localhost:8080
Run a specific version tag:
docker run --rm -p 8080:8080 haanlaurent/sourceprinter:RELEASE_TAGBuild and run locally from this repository:
docker build --pull -t sourceprinter:local .
docker run --rm -p 8080:8080 sourceprinter:localSee deploy/README-DEPLOY.md.
Existing images must be rebuilt and containers replaced to pick up runtime security fixes. Pulling latest only helps after a patched SourcePrinter image has been published. Check the runtime in a running container with docker exec sourceprinter node --version.
Unimozer Next: https://github.com/haan/UnimozerNext