In this article, we are going to see how we can perform this split PDF using the PDF splitting API by Here we are having the power cell program for these. So we have basically, PowerShell implementation of the split PDF, and first of all, let us see the input file, which we are going to split it up.

There are a total of four pages here. You see the first page with the image, second page with text, the third page with the references, and the fourth page with the different article sources and contributors.

PDF Splitting API

Now what we are going to do here, we have the variable or the pages. So whatever the page number, we want to split it up. We’re going to have the comma-separated representation for it. For example, in the first split. If we want to page number one to two and in the second split, we want to all the pages after the third. So these kinds of pages are going to split up and we’re going to make this asynchronous job. So this is a URL of the API call, we’re going to perform for the split PDF, you see. It’s a base URL and then our URL is the PDF split.

Split PDF Webinar

We are going to provide the input parameters like the pages and URL of the input file. And this is an executed operation. So async, while the coding or while the looping, we’re going to provide the API keys in the headers. Once we record the response because this is the Asynch operation, we’re going to get the job ID in the response. We are fetching the job ID here and this is the placeholder for the actual response.

Initially, this URL doesn’t contain anything until the job is completed. We are going to use this URL and get the details. We are inside the infinite by loop here till the job is completed. We are checking the jobs periodically. Once it’s succeeded, you’re going to get all the files. Inside the result JSON file, we are going to perform the download one by one. Let’s see these in action. and fire up the terminal. We are having the power cell terminal here and I am simply going to execute it and here we go.

So, we got the job response, and we can see it is working. We can download the first part and the second part. We’re going to reveal in the Explorer, begin to see the files here. Here’s the first part of the two pages’ first page with the image. The second page with all the text and the second part.

How to Split PDF with API

You see all the references and articles sources. So it’s that easy to perform the split operation with

GET YOUR API KEY Zapier plugin  Explore API Docs


Check this video tutorial using Web API and follow us on YouTube! video tutorial REST Web API tutorials

Related Pages: