PDF contain 13pages and I need to check/uncheck checkboxes in particular area in PDF.
How to automate the check/uncheck checkboxes in particular area in PDF
PDF contain 13pages and I need to check/uncheck checkboxes in particular area in PDF.
How to automate the check/uncheck checkboxes in particular area in PDF
Use regular UI automation (ie Use Application/Browser) to open the PDF in a PDF viewer app that lets you check the boxes. The Check/Uncheck activity may work, if not try Click.
Hi @rumabharathy ,
Please try with OCR engine (Read PDF with OCR), defiantly you could analysis the character (for checked/unchecked box).
regards,
1.First read the pdf with “Read pdf activity” Or “Read pdf with ocr”.
2.the out will be text soo based on that you can apply regex
3.Example : One field ha checked like it will be this X Factor is checked
Condition of regex = .(?:\s)?(?=Factor)
It will match the X and store in one variable
Take if activity and pass condition like this
Variable.tostring.contains (“X”)
You can assign True if not in else you can assign false
Generally it would be a form based pdf…if so we can do it through backend instead of using ui…using pdf form based activities from marketplace or we can write a small vb code using itext and use it…
This supports windows legacy…
If needed in windows use itext library and build it
If you dont want to go with code…then in acrobat enable the accessibility options and use the ui to find the elements
https://docs.uipath.com/studio/docs/identifying-ui-elements-in-pdf-with-accessibility-options
Hope this helps
Cheers
@Anil_G I tried the Novigo solutions, but that activity works if the PDF is “Tagged PDF”.
Our PDF are Untagged one, so unable to use check/uncheck boxes using code also
@Nguyen_Van_Luong1 @Praveen_Mudhiraj I tried Read PDF activity and I am getting the below message
Try with this code
PdfAcroForm form = PdfAcroForm.GetAcroForm(pdf, true);
form.GetField("name").SetValue("John Doe");
form.GetField("age").SetValue("30");
pdf.Close();
You can install itext7 library from the manage packages and then use these
Cheers
@Anil_G My use case is to fill the check boxes showing below
I need to automate filling only the check boxes
Is coding “itext7” method works for those scenario?
It should ideally
To check please try to use the same…you need to first get the form fields…you need to fill and can use them
Cheers
@rumabharathy Did you try what I first suggested above?
@postwick I tried the Click activity and it is not working as expected.
I will try with Check/Uncheck activity
Thanks for the information
I tired this, but unable to get the form field from my PDF because it is “Untagged PDF”
Adding the value in PDF using coding “form field” method works if the PDF is “Tagged PDF” because tagged pdf contain all the form field details, so we can easily set the value for those field
I tried to manually tagging my PDF using Adobe Pro, but all the tag options are in disable mode.
@postwick I tried Click and Check/Uncheck activity
Click not working as expected
Check/Uncheck activity- Throwing error as “Indicate checkbox is not valid check box try with click activity”
Is UiPath able to identify the checkboxes as UI elements? Make sure you have the Click set to hardware for the input mode.