Reading particular string from PDF file

Hi All,

I want to read FCY Conversion row from below screenshot.

For this, I tried like this and got solution:

Start = getText.IndexOf(“charged)”)+“charged)”.Length

End = getText.IndexOf(“TOTAL”)

RequiredString = getText.Substring(Start,End-Start).Trim

But the problem is FCY Conversion row is changing every time and because of that am not able to fix the end index. Please check below 2 screenshots.


Could you please check once and help me to implement this. Eagerly waiting for your response.

Thanks & Regards,
Lakshman Ganta.

Hi Lakshman,

Please use regex(Regular expression) and get the required string from your pdf file.

link: https://regexr.com/

For exact solution, please share your pdf. will provide you the solution.

Thanks!

Yep, I think Kadiravan has the right solution.

If the row titles are consistent, I’d just split on "FCY Conversion(Only GST amount being charged) by using this - How to Split a String - #8 by vikas_reddy_Vicky

And then use a matches activity (https://activities.uipath.com/docs/matches) with regex to pull out the three values. Something like this (([\d+,]+)(.\d+)?\s\w{3}|(\w+.?)\s?[\d+,]+(.?\d+))

from here python - I want to match money amount with regex for indian currency without commas - Stack Overflow

1 Like

@kadiravan_kalidoss,

Thank you. Will try with Regular expression.

Hi All,

I want to read below highlighted fields from PDF File.

image

I tried read PDF activity and it gave below string as output.

Output:
Drawee Details
Drawee Name Drawee Country Drawee Bank Drawee Branch
AMCOR FLEXIBLES SELESTAT
SAS
FRANCE
Bill Details
Bank Ref Transaction Id Operation Transaction Date Value Date
1541FIGS181192 S88151100 Realisation 25-OCT-2018 25-OCT-2018
Currency Conversion Details
Type From CCY Amount Rate To CCY Amount
Sale EUR 49997.77 83.6267 INR 4181148.51
TRANSACTION DETAILS Invoice Details
Acc No Details CCY Amount Debit Credit Number
Date
CCY
Amount
035
18-SEP-2018
EUR
49997.77
Office Account 1541FIGS181192 EUR 49997.77
Office Account COMM ON FIGC INR 1250.00
Office Account SGST/UTGST @ 9% INR 112.50
Office Account CGST @ 9% INR 112.50
Office Account SGST/UTGST-currency
conversion @ 9%
INR 781.31
Office Account CGST-currency conversion @
9%
INR 781.31

Its reading the file in vertical order and how to fetch required highlighted fields. Could you please help me in this.

Thanks & Regards,
Lakshman Ganta.

Did you get any solution for this problem?