PDF tools
Every tool follows the same shape: upload a file (it becomes a tracked file-metadata row), configure options, get a download. Each "heavy" run consumes one quota unit. All endpoints are POST /api/pdf/* and require a token.
Page operations
| Tool | Endpoint | What it does |
|---|---|---|
| Merge | /merge | Combine an ordered list of PDFs into one |
| Split | /split | Extract a page range (startPage → endPage) |
| Remove pages | /remove-pages | Delete specific 1-based page indices |
| Compress | /compress | Reduce file size while keeping it readable |
| Watermark | /watermark | Stamp a text watermark — color, opacity, font size, rotation, position (posX/posY as page fractions), and over / under layer |
| Page numbers | /page-numbers | Stamp numbers — format string (Page %p of %t), font, color, position, margin, start page, start number, explicit page range |
Conversions
| Tool | Endpoint |
|---|---|
| PDF → Image / Image → PDF | /convert (PNG / JPEG / BMP at 150 DPI) |
| PDF → Word / Word → PDF | /pdf-to-word · /word-to-pdf |
| PDF → Excel / Excel → PDF | /pdf-to-excel · /excel-to-pdf |
| PDF → PowerPoint / PowerPoint → PDF | /pdf-to-ppt · /ppt-to-pdf |
Office conversions use Apache POI; page-to-image rendering uses PDFBox.
Security
| Tool | Endpoint | Notes |
|---|---|---|
| Protect | /protect | Password-encrypt a PDF |
| Unlock | /unlock | Remove password protection — requires the current password |
| Redact | /redact | Find one or more terms and remove them from the content, not just black them over |
| Remove watermark | /remove-watermark | Strip a watermark by term or on given pages |
OCR
/ocr runs Tesseract on every page and produces a searchable PDF — the way to make a scanned document selectable and indexable.
Text & editing
| Tool | Endpoint | What it does |
|---|---|---|
| Extract text | /extract-text | Return the text spans on each page (optionally with OCR fallback) |
| Edit | /edit · /edit-text-layer | Modify the text layer in place |
AI tools
Available when OPENAI_API_KEY is set:
| Tool | Endpoint | What it does |
|---|---|---|
| Translate | /api/pdf/translate | Translate a PDF's text to a target language, line-by-line, preserving layout and leaving brand / product names alone |
| Generate | /api/pdf/builder/ai-generate | Produce a complete draft document from a template type (NDA, SERVICE_AGREEMENT, INVOICE, …) as structured blocks — headings, paragraphs, lists, tables |
Build a PDF from scratch
POST /api/pdf/builder/create — the PDF Creator (/pdf/create) turns a structured block document (headings, paragraphs, lists, tables, dividers) into a PDF. It's what the AI generator's output feeds into.
Frontend
/pdf-tools is the gallery — Popular, Convert, and Secure sections. Most tools render through a generic ToolPage (/tools/:id); three with richer option UIs have dedicated pages: /tools/remove-pages, /tools/watermark, /tools/page-numbers.