PDF Extract Page

Extract specific pages from PDF files.

Endpoint

POST https://www.acrewity.com/api/services/execute

Authentication

Include your API key in the Authorization header:

Authorization: Bearer YOUR_API_KEY

n8n Integration

This service is also available via our n8n community node: @acrewity/n8n-nodes-acrewity

Operations

Extract Pages

Extract specific pages from a PDF

Operation ID: extract

Parameters

Parameter Type Required Default Description
pdf file Yes - PDF file to extract pages from (Base64 encoded, with or without data URI prefix)
page_numbers array Yes - Array of page numbers to extract (1-based indexing)

Example Request

Extract Single Page:

{
  "service": "pdf-extract-page",
  "operation": "extract",
  "parameters": {
    "pdf": "data:application/pdf;base64,JVBERi0xLjQKMSAwIG9iago8PAovVHlwZSAv...",
    "page_numbers": [1]
  }
}

Extract Multiple Specific Pages:

{
  "service": "pdf-extract-page",
  "operation": "extract",
  "parameters": {
    "pdf": "data:application/pdf;base64,JVBERi0xLjQKMSAwIG9iago8PAovVHlwZSAv...",
    "page_numbers": [1, 3, 5, 7]
  }
}

Extract Cover and Back Pages:

{
  "service": "pdf-extract-page",
  "operation": "extract",
  "parameters": {
    "pdf": "JVBERi0xLjQKMSAwIG9iago8PAovVHlwZSAv...",
    "page_numbers": [1, 10]
  }
}

Example Response

{
  "success": true,
  "result": {
    "data": {
      "downloadable": true,
      "filename": "extracted-pages-1735567890123.pdf",
      "contentType": "application/pdf",
      "size": 45238,
      "content": "JVBERi0xLjQKMSAwIG9iago8PAov...",
      "downloadUrl": "/api/downloads/extracted-pages-1735567890123.pdf",
      "extractedPages": [1, 3, 5, 7],
      "pageCount": 4,
      "originalPageCount": 20,
      "extractedAt": "2024-12-30T10:15:30.000Z"
    }
  },
  "credits_used": 1
}

More Examples

See Document Processing Examples for complete workflow examples including chapter extraction, form isolation, and selective document sharing.