In this session, we will be seeing how to Add Text or Image to PDF with Blue Prism with help of the PDF.co plugin. I have created this action on the base of this PDF.co API which is like PDF/edit/add and as it is apparent in the body.
How to Add Text/Images to PDF with Blue Prism
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.
If we look into the structure of this data then we can find the first two parameters, the X and Y coordinates where Text 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 a text itself. After that it’s font size, font name, the color of the font then it’s URL. For example, click on this text, we want to open an URL then we can provide 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 objects edit in the PDF then we can configure it by using the pipe separated.
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.
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 which 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 on all the pages. This is how we can use a PDF.co plugin with the Blue Prism to add any text or image to our existing PDF.
PDF.co and Blue Prism Integration
Need help and support? Please use the button below: