Skip to main content

Splitting a PDF at a page

Splitting a PDF at a page will allow you to break the document down into 2 separate documents using the PDF.API.

The page parameter dictates at what page the PDF should be split.

You can view the full Swagger documentation here.

Request

curl --location 'https://pdf-api.doclabs.cloud/api/v1/MyDocumentWith5Pages.pdf/atpage?storageName=MyBucketName' \
--header 'Content-Type: application/json' \
--header 'x-api-key: ••••••' \
--data '{
"page": 2
}'

Response

{
"bucketName": "MyBucketName",
"contentPathNames": [
"DocumentContaining2Pages.pdf",
"DocumentContainingTheRest.pdf",
]
}