canonical: https://jentic.com/apis/pdfblocks.com/pdfblocks

# PDF Blocks API

PDF Blocks API provides secure PDF manipulation operations including document merging, page extraction, removal, rotation, and reversal, password and restriction management, watermarking with text or images, and digital signature removal. All operations accept PDF files via multipart upload and return processed files directly in the response. The API focuses on document security and page-level manipulation without format conversion.

## For AI agents

Merge PDFs, manage passwords and restrictions, add watermarks, and manipulate pages (extract, remove, rotate, reverse) for secure document workflows.

## Scope

Does not handle format conversion, OCR, or AI data extraction - use for page manipulation, security management, and watermarking only.

## Capabilities

- Merge multiple PDF documents into a single consolidated file
- Extract specific pages from a PDF into a new document
- Add and remove password protection on PDF files
- Apply text or image watermarks to all pages of a document
- Set and remove usage restrictions (print, copy, edit) on PDFs
- Rotate individual pages or all pages in a document
- Remove digital signatures from signed PDF documents

## Use cases

### Document Security Management

Add, modify, or remove security features on PDF documents. PDF Blocks handles password protection via POST /v1/add_password, usage restrictions (disable printing, copying, editing) via POST /v1/add_restrictions, and signature removal via POST /v1/remove_signatures. This enables compliance workflows where documents need different security levels at different stages of their lifecycle.

Example prompt: Add a user password 'readonly123' and owner password 'admin456' to a PDF document via POST /v1/add_password with the file uploaded as multipart form data

### PDF Page Manipulation

Modify page structure within PDF documents by extracting, removing, rotating, or reversing pages. POST /v1/extract_pages creates a new PDF containing only specified pages. POST /v1/remove_pages removes unwanted pages. POST /v1/rotate_pages changes page orientation. These operations enable automated document assembly and cleanup workflows.

Example prompt: Extract pages 1, 3, and 5 from a 10-page PDF via POST /v1/extract_pages and download the resulting 3-page document

### Document Watermarking

Apply text or image watermarks across all pages of a PDF document for branding, confidentiality marking, or draft identification. POST /v1/add_watermark/text adds configurable text overlays (font, size, color, rotation, opacity) and POST /v1/add_watermark/image adds logo or stamp overlays. Watermarks are rendered as transparent layers on each page.

Example prompt: Add a diagonal text watermark 'DRAFT' in red at 50% opacity to all pages of a PDF via POST /v1/add_watermark/text

### AI Agent Document Operations via Jentic

AI agents use the PDF Blocks API through Jentic to merge documents, manage security, and manipulate pages without handling API keys directly. Agents search by intent, receive typed schemas for PDF operations, and execute calls with Jentic managing the X-Api-Key header injection. This enables automated document preparation workflows in legal, compliance, and publishing contexts.

Example prompt: Search Jentic for 'merge PDF documents', load the schema for POST /v1/merge_documents, and execute with two PDF files to produce a combined document

## Key endpoints

| Method | Path | Description |
| --- | --- | --- |
| POST | /v1/merge_documents | Merge multiple PDF files into one |
| POST | /v1/extract_pages | Extract specific pages into a new PDF |
| POST | /v1/remove_pages | Remove pages from a PDF |
| POST | /v1/add_password | Add password protection to a PDF |
| POST | /v1/remove_password | Remove password from a PDF |
| POST | /v1/add_watermark/text | Add text watermark to all pages |
| POST | /v1/add_watermark/image | Add image watermark to all pages |
| POST | /v1/rotate_pages | Rotate pages in a PDF |

## Key resources

- **Document Merge** — Combine multiple PDF files into one document
- **Page Operations** — Extract, remove, rotate, and reverse pages within PDFs
- **Security** — Manage passwords, restrictions, and digital signatures
- **Watermarks** — Apply text and image watermarks to PDF pages

## Why Jentic

- **Setup:** Wiring the PDF Blocks API by hand means managing the API-key request header, choosing the global or European-only host, and handling multipart file uploads across merge, security, and watermark calls yourself. Through Jentic you install once, import PDF Blocks from the API Directory, store the API key once, and your agent calls it.
- **Permission scoping:** PDF Blocks carries its documents and options in the request body, so scope the agent by the operations it needs, such as merging documents or adding a text watermark. You choose that set, so operations like removing a password or removing pages are not included unless you add them.
- **Credential handling:** Your PDF Blocks API key is stored once, encrypted, by your own Jentic One instance and injected into the API-key request header at execution time. It never enters the agent's prompt, logs, or context.
- **Discovery method:** Agents search Jentic by intent such as 'add a password to a PDF' or 'watermark a document', and Jentic returns the matching PDF Blocks operation with its input schema specifying the file upload and parameters so the agent calls the right endpoint without reading the reference docs.

## Related APIs

- **PDF.co API** — Broader document processing with format conversion and AI parsing alongside manipulation
- **iLovePDF API** — PDF toolkit with compression and office format conversion alongside merge and split
- **PdfBroker.io API** — PDF generation from HTML and XSL-FO templates, complementing manipulation operations

## FAQ

### What authentication does the PDF Blocks API use?

The PDF Blocks API uses an API key passed in the X-Api-Key header. You obtain your key from the PDF Blocks dashboard at dashboard.pdfblocks.com. A free tier is available for testing. Through Jentic, this key is stored encrypted and injected automatically.

### Can I merge more than two PDF files at once?

Yes. POST /v1/merge_documents accepts multiple PDF files via multipart form data upload. The files are merged in the order they are submitted, producing a single output PDF containing all pages from all input documents.

### What are the rate limits for the PDF Blocks API?

The free tier allows 50 operations per month with files up to 5MB. Paid plans increase limits to 1000+ operations per month and support files up to 50MB. Rate limiting is applied per API key with a per-second burst limit of 5 requests.

### How do I add a watermark through Jentic?

Search Jentic for 'watermark PDF document', load the schema for POST /v1/add_watermark/text, and execute with the PDF file and watermark parameters (text, font size, color, rotation, opacity). Jentic handles the X-Api-Key injection and returns the watermarked PDF.

### Can I remove password protection from a PDF?

Yes. POST /v1/remove_password accepts a password-protected PDF and the current password, then returns an unprotected version. You must know the existing password to remove protection. This is useful for automated workflows processing received documents that need to be unlocked for further manipulation.

### Can I limit what my agent is allowed to do with the PDF Blocks API?

Yes. Because you run Jentic One yourself, your own rules decide which PDF Blocks operations the agent may call, so you can allow only what a workflow needs, such as merging documents via POST /v1/merge_documents or adding a text watermark via POST /v1/add_watermark/text. Operations you do not grant, like removing a password via POST /v1/remove_password or removing pages via POST /v1/remove_pages, stay unavailable to the agent. Your stored API key is injected at execution time and never enters the agent's prompt or context.
