Upload PDFs
pdf_merger_upload_pdfsUpload PDF files for later merging. Start a new session or append files to an existing session before merging them.
Instructions
Upload one or more PDF files to the PDF Merger service for later merging.
Each file must be a valid PDF (≤100 MB). Up to 30 files can be uploaded per session. If session_id is provided, files are appended to that existing session; otherwise a new session is created.
Args:
file_paths (string[]): Absolute paths to PDF files on disk.
session_id (string, optional): UUID of existing session to append to.
Returns (JSON): { "session_id": "uuid", "files": [ { "id": "uuid", "name": "doc.pdf", "size": 102400, "sizeFormatted": "100.0 KB" } ] }
Examples:
Upload two files to a new session: file_paths=["/tmp/report.pdf", "/tmp/appendix.pdf"]
Append to existing session: file_paths=["/tmp/extra.pdf"], session_id="550e8400-..."
Error Handling:
File not found on disk → clear message with the missing path
Non-PDF file → 415 error from API
File >100 MB → 413 error from API
30 files in session → 400 error from API
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| file_paths | Yes | Absolute file paths to PDF files on the local filesystem (e.g., ["/home/user/doc1.pdf", "/home/user/doc2.pdf"]) | |
| session_id | No | Optional existing session ID to append files to. Omit to create a new session. |