How to Split PDF Using Automation Anywhere and PDF.co

Sep 2, 2024·5 Minutes Read

Automation Anywhere is a technology company headquartered in San Jose, California, USA. It is a provider of an end-to-end Robotic Process Automation (RPA) and Artificial Intelligence (AI) platform for automating any business process. They offer Discovery Bot for fast-track automation, IQ Bot for transforming unstructured and hidden data with AI that can learn on its own, Bot Insight for real-time analytics, and a Bot Store to get pre-built automation solutions.

We prepared this step by step tutorial with screenshots on how to make a Bot using PDF.co to split PDF.

In this tutorial, we assume that you have already had a Community or Enterprise version of Automation Anywhere with the Chrome extension as well as client agent already installed. We also assume that you have basic knowledge of how to create a simple bot and have it executed on your machine.

PDF.co API Endpoint

We will use the PDF.co API Endpoint for splitting PDF into multiple pages. We’ll have the PDF.co method covered either by Postman or online documents at developer.pdf.co so that we can configure API as per our need.

Using the PDF.co Split API in Postman
Using the PDF.co Split API in Postman

Bot Creation

In Automation Anywhere cloud Control Room, create a new boat to split PDF. We’ll be using the “REST Web Service: Post Method” action to consume PDF.co /pdf/split API endpoint. We’ll also have the “Message Box” action attached to the output of the API call. The final bot structure will be as follows:

Automation Anywhere
Automation Anywhere

URI Configuration

Generate a URI to “https://api.pdf.co/v1/pdf/split” in “Rest Web Service: Post Method” action.

Entering the URI in Automation Anywhere
Entering the URI in Automation Anywhere

Header Configuration

Create the Header key with the name “x-api-key” with the API key for PDF.co. This API key is important for consuming PDF.co APIs. API keys can be found on your PDF.co Dashboard.

Add your API Key
Add your API Key

Request Input Configuration

Configure input data to the REST web API call. Here, we have the input request JSON data as follows:

{"url": "https://bytescout-com.s3.amazonaws.com/files/demo-files/cloud-api/pdf-split/sample.pdf", "pages": "1-2,3-"}
Enter the JSON
Enter the JSON

Configure Rest API Output

Generate the output variable of the type dictionary representing the response of API call.

Edit the variable
Edit the variable

Configure Message Box

Drag and Drop the “Message box” action and attach it after the “REST Web Service: Post Method” action. Here, we’ll configure “message to display” with the “Body” property of the output variable.

Configure the message box
Configure the message box

Execute Bot and Review Output

Now, as the configuration is completed, we may proceed to execute the bot and see the output message box. Check out how the final message output looks like.

Execute Bot and Review Output
Execute Bot and Review Output

Related Tutorials

See Related Tutorials