'Get Text' Activity is printing the wrong output from the PDF file

Hello everyone,

I currently working on an exercise in UiPath where I am using a ‘Get Text’ activity to try and extract a dynamic InvoiceNo from a PDF, such as the one below:

Below are the Strict Selector properties I have set to ensure that it can collect the InvoiceNo from a dynamic range of PDF files:

The output it should give on the MessageBox, should be ‘InvoiceNo: 485744’. However, this keeps on giving ‘1’:

I am curious to know what I could be doing wrong. Any tips on how I can fix this?

Hi @sukh.johal

Try giving wildcard * ro ctrl name instead of Invoice No.* and try printing in Message Box.

Regards

Hi @sukh.johal

welcome to UiPath community!!!

instead of get text you can try with read PDF Text or Read PDF with OCR activity you can try. Then you can scrap the specific text with regular expression or some basic methods such split etc.

refer the below thread for your reference.

Hope it helps!!!

I am not interested in using read PDF Text or read PDF with OCR, as the execise requires me to use Get Text. Hence, why I refrain from using those.

Hi @sukh.johal

xaml:
Sequence13.xaml (15.2 KB)

Output:
image

Regards

good job. thank you for the post.