Copy link to clipboard
Copied
Hi,
Can anyone tell me how can i delete multiple pages using adobe PDF tools api, currently i'm able to delete single page or by using page ranges.
But i want to delete multiple pages like i want to delete 2,5,8 page from a pdf, so i want to know how i will pass this to api.
Here is the link of documentation: https://documentcloud.adobe.com/document-services/index.html#post-pageManipulation
Copy link to clipboard
Copied
Hi @Sameer5C66 ,
Thanks a lot for trying out our product and provide your valuable feedback. The API supports deleting multiple pages in one go by providing multiple page ranges in pageRanges object. Please find the details Form Parameters in POST pageManipulation endpoint.
To solve your use case, please supply the page ranges in the below format -
"cpf:inputs": {
"params": {
"cpf:inline": {
"pageActions": [{
"pageAction": {
"delete": {
"pageRanges": [{
"start": 2,
"end": 2
}, {
"start": 5,
"end": 5
}, {
"start": 8,
"end": 8
}]
}
}
}]
}
},
"documentIn": {
"cpf:location": "InputFile0",
"dc:format": "application/pdf"
}
}
Hope this helps.