Anvil-PDF is a lightweight PDF toolkit written in Go.
The goal is to provide a fast, developer-friendly alternative to tools like iLovePDF and Stirling-PDF.
🚀 MVP Features (current)
- 📷 JPEG → PDF: Convert multiple images into a single PDF file.
- 📉 PDF Compression: Reduce the size of PDF files by downsampling/recompressing images.
-
Fork the repo on GitHub.
-
Clone your fork:
git clone https://github.com/<your-username>/anvil-pdf.git cd anvil-pdf
-
Add upstream (for syncing with original repo):
git remote add upstream https://github.com/iiitk-tools/anvil-pdf.git
-
Keep your fork updated:
git pull upstream main
-
Hot Reload with Air
- We use Air for live reloading during development.
go install github.com/air-verse/air@latest
Ensure
$GOPATH/binor$HOME/go/binis in your$PATH.air init
This generates
.air.toml. -
Run with Hot Reload
air -- --port 8081
Whenever you modify Go files, Air rebuilds & restarts automatically.
anvil-pdf/
│── cmd/
│ └── server/ # main server entrypoint
│
│── internal/
│ ├── pdf/ # PDF operations (convert, compress, etc.)
│ └── api/ # HTTP handlers
│
│── pkg/ # reusable helpers (logger, config, etc.)
│
│── go.mod
│── go.sum
│── README.md