Split a PDF into separate documents by page ranges. Enter comma-separated page numbers or ranges (e.g. 3,5-8,10).
Enter page numbers where the document should be cut. Each number creates a new document starting at that page.
# Split PDF at pages 3 and 7 curl -X POST https://www.bastiantechnologies.com/api/pdf/split \ -H "X-API-Key: your_api_key" \ -F "pdf=@document.pdf" \ -F "splitPages=3,7" # Poll status curl https://www.bastiantechnologies.com/api/pdf/split/status/{jobId} \ -H "X-API-Key: your_api_key" # Download individual file curl https://www.bastiantechnologies.com/api/pdf/split/download/{jobId}/part-1.pdf \ -H "X-API-Key: your_api_key" -o part1.pdf # Or download all as ZIP curl https://www.bastiantechnologies.com/api/pdf/split/download-zip/{jobId} \ -H "X-API-Key: your_api_key" -o split.zip
const fd = new FormData(); fd.append('pdf', file); fd.append('splitPages', '3,7,10'); const { jobId } = await fetch('/api/pdf/split', { method: 'POST', headers: { 'X-API-Key': 'your_api_key' }, body: fd }).then(r => r.json()); // Poll until done let data; do { await new Promise(r => setTimeout(r, 2000)); data = await fetch(`/api/pdf/split/status/${jobId}`, { headers: { 'X-API-Key': 'your_api_key' } }).then(r => r.json()); } while (data.status === 'processing');
import requests, time headers = {"X-API-Key": "your_api_key"} r = requests.post("https://www.bastiantechnologies.com/api/pdf/split", headers=headers, files={"pdf": open("doc.pdf", "rb")}, data={"splitPages": "3,7,10"}) job_id = r.json()["jobId"] while True: s = requests.get(f".../api/pdf/split/status/{job_id}", headers=headers).json() if s["status"] in ["completed", "failed"]: break time.sleep(2)
// HTTP Request node — Split PDF Method: POST URL: https://www.bastiantechnologies.com/api/pdf/split Auth Header: X-API-Key: your_api_key Body Type: Form-Data Fields: pdf → binary file splitPages → "3,7,10"