Skip to main content
Participant
April 25, 2021
Question

Delete multiple pdf pages using adobe pdf tools api

  • April 25, 2021
  • 1 reply
  • 352 views

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

 

This topic has been closed for replies.

1 reply

Participating Frequently
June 30, 2021

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.