PDF Toolkit¶
The PDF Toolkit provides a structured API for common PDF workflows: manipulation, text extraction, OCR, image rendering, form processing, and document generation.
It is designed for developer workflows where you want JSON responses, predictable request bodies, and optional Python SDK usage rather than browser automation or heavyweight desktop PDF tooling.
Base URL¶
https://pdf.toolkitapi.io
Browse by topic¶
To make the examples easier to work through, the PDF docs now include focused subpages:
Key endpoints¶
| Endpoint | Purpose |
|---|---|
POST /v1/pdf/merge |
Merge multiple PDFs into one |
POST /v1/pdf/split |
Split a PDF into parts or pages |
POST /v1/pdf/rotate |
Rotate selected pages |
POST /v1/pdf/compress |
Reduce file size |
POST /v1/pdf/watermark |
Add text watermarks |
POST /v1/pdf/protect |
Encrypt or decrypt a PDF |
POST /v1/pdf/from-images |
Build a PDF from one or more images |
POST /v1/pdf/from-template |
Generate a PDF from a Liquid template |
POST /v1/pdf/text |
Extract page text |
POST /v1/pdf/metadata |
Read or update metadata |
POST /v1/pdf/table-extract |
Extract tables |
POST /v1/pdf/form-fields |
Read or fill form fields |
POST /v1/pdf/info |
Return structural document information |
POST /v1/pdf/ocr |
OCR scanned or image-only PDFs |
POST /v1/pdf/to-images |
Render PDF pages to PNG or JPEG |
Common usage model¶
Most endpoints accept either:
pdf— a base64-encoded PDFurl— a public PDF URL
Many responses return processed output as base64 alongside useful metadata such as page counts, file size, extracted table counts, or OCR totals.
Quick example¶
from toolkitapi import PDF
with PDF(api_key="tk_...") as pdf:
result = pdf.info(url="https://toolkitapi.io/report.pdf")
print(result["page_count"])
Best fit use cases¶
- compressing and merging uploaded reports
- extracting text and tables for downstream analysis
- OCR on scanned documents
- building PDFs from templates or image bundles
- filling or reading PDF forms