Adding Comments to a pdf file

Hi all, I need help in getting a bot to add comments to a pdf file, for example:

I need the bot to add comments in the boxes that say “Add note”. (The red boxes wont be there, so essentially i need the bot to target whitespace.)

The way I’m thinking of implementing it is to offset a click from the “Comment” header and then right clicking and add comment. But I do not know if that is reliable or even repeatable for every row.

Is there a better way to implement this functionality.
Thank you.

I’ve attached the test.pdf file, if anyone needs it.
test.pdf (25.1 KB)

I think ui automation tuned with good selector is the approach

i could see in pdf that there is no add note option

Did you tried converting that to word and adding the data and converting back to pdf??

In work you can use bookmark feature and word activities to set the content…

Else you will have to open the pdf in a pdf reader and then you can use Cv or anchor based activities to properly select the element and to write the comment.

Did you tried converting that to word and adding the data and converting back to pdf??

Hi, I tried this, but the conversion from pdf to word turns the comments into images and textboxes in word.

Converting the document back to pdf turns the comments into still images on the pdf page. So I’m afraid this won’t work.

open the pdf in a pdf reader and then you can use Cv or anchor based activities to properly select the element and to write the comment

I believe this would work, but I haven’t been able to get it to work yet. Still trying currently.

Thnak you.

Hi @pmilanraajp,

I dont have an example ready, but I know your query can be solved by GhostScript.

Please go through the solution in this thread : regex - Add comments to PDF files automagically with regular expressions - Stack Overflow

You can integrate it with UiPath once you can find a way to do it in PowerShell.