How to Add Text/Images to PDF with Blue Prism

Sep 2, 2024·6 Minutes Read

In this tutorial, we will be seeing how to Add Text or Images to PDF with Blue Prism with help of the PDF.co plugin. I have created this action on the basis of this PDF.co API which is like PDF/edit/add and as it is apparent in the body.

Define Parameters

The parameters contain the output name and the URL of the PDF on which this process needs to be performed. Then these two parameters which are Annotation String and the Image String represent the text field to be added and the image field to be added respectively.

Parameters in Postman
Parameters in Postman

Set Input Parameters

If we look into the structure of this data then we can find the first two parameters, the X and Y coordinates where Text is to be added. Then the next parameter is the number of pages or on which page this Text needs to be added then it’s the text itself. After that, it’s font size, font name, the color of the font, and its URL. For example, click on this text, we want to open an URL then we can provide it here.

The last parameter represents whether the Text Annotation is transparent or not. We have set transparent in this case and for the image parameter, the first two parameters represent the x and y coordinate. Then it is representing the number of pages or on which page number these images need to be added then it is the URL of the image itself. If you want to add more than one image then we can separate them by the pipe character.

The same thing with the annotation also if you want to have more than one Text object edit in the PDF then we can configure it by using the pipe separated.

X & Y coordinates
X & Y coordinates

Configure the Actions to be Taken in Blue Prism and Add Images

The last thing, let’s see these input URLs and try to see how it is looking. It’s a PDF with three pages and let’s see this in action. Now in the Blue Prism studio, drag and drop action and try to configure it. In the name option, we put Add Image/Text. In the Business Object, I will be selecting PDF.co Web API Services and we have the correct action. Copy and paste the URL here.

For the Annotation String, copy and paste the Annotation from the Postman. Now add the Images. Basically, there are two images and we will provide the API key. I will be copying pasting my API key here. We have configured all the input actions.

Blue Prism UI
Blue Prism UI

Configure the Output and Execute the Process

Now, let’s configure the output also. Set the resulting URL and create a variable that is Result_url. I think we are good to go. We need to link up here from Start to End and we are ready for the execution.

The process has been completed and let’s see how to output PDF looks like. This is the text which we set and these are the two images that we have set. Click on the image, it’s directing me to the PDF.co website which we have set it. We will go on the whole page because we have configured these to be added to all the pages. This is how we can use a PDF.co plugin with Blue Prism to add any text or image to our existing PDF.

PDF.co and Blue Prism Integration

Contact Support

Related Tutorials

See Related Tutorials