Payments & Adjustments
Description Amount Total
Mar 22 Payment -$17.10
Mar 22 Payment Reversal $100.00
Apr 01 Adjustment $ 7.09
Apr 10 Adjustment $20.44
Late Fee Credit -$32.10
Credit - Care -$54.00
NONRETURN_FEE $50.00
NONRETURN_FEE $50.00
NONRETURN_FEE $50.00
Service $103.44
CK 160.00 RETURNED; REASON $30.00
Total Payments & Adjustments -$117.10
Service Summary
Service Amount Total
Internet Service $106.40
Total Current Charges $106.40
Details
Qty Amount Total
Charges (Apr 01 - Apr 30)
Internet - Gigabit $85.00
Rental $10.00
Rent - blah ($5 ea) 2 $10.00
Total Charges (Apr 01 - Apr 30) $105.00
Taxes and Fees
State Sales Tax $1.40
Total Taxes and Fees $1.40
Total for Service $106.40
It is an invoice so there will be multiple currency values throughout the PDF page. I was hoping there was a way to just get the strings in this section alone. (Begins with, read ahead/behind, get values in between, etc.)
Payments & Adjustments
Description Amount Total
Mar 22 Payment -$17.10
Mar 22 Payment Reversal $100.00
Apr 01 Adjustment $ 7.09
Apr 10 Adjustment $20.44
Late Fee Credit -$32.10
Credit - Care -$54.00
NONRETURN_FEE $50.00
NONRETURN_FEE $50.00
NONRETURN_FEE $50.00
Service $103.44
CK 160.00 RETURNED; REASON $30.00
Total Payments & Adjustments -$117.10
Service Summary
Service Amount Total
Internet Service $106.40
Total Current Charges $106.40
Details
Qty Amount Total
Charges (Apr 01 - Apr 30)
Internet - Gigabit $85.00
Rental $10.00
Rent - blah ($5 ea) 2 $10.00
Total Charges (Apr 01 - Apr 30) $105.00
Taxes and Fees
State Sales Tax $1.40
Total Taxes and Fees $1.40
Total for Service $106.40
Reading from PDF invoice as strings.
Data Table column is a string being parsed and converted to a double.
If string has “-”, it is being converted to CDbl to add “-”.
I’ve done this for page 1 & 2 so far.
Currently trying to figure out an easy way to get the data needed from page 3-4.
CDbl isn’t something you convert to. It’s a method that you use to convert a string to a double. String and double are datatypes, types of values/variables. Using CDbl to convert a string to double doesn’t add “-” unless the “-” is on the front of the string already. A double (ie number with decimal places) can be positive or negative.
I need the currency strings under the “Payments & Adjustments” section ONLY. I’d like a collection that can be added to a DataTable with columns “Payment/Adjustment, Total Payments & Adjustments, and Account Number”. I have the values for the last two columns. I do not want to make a column for every potential payment, fee, or adjustment but I would like the dt to add each value from collection in for loop.
I will edit the post to give an example of what the data looks like to go with the question being asked.
The post has been edited for what values are needed in the section I’d like. Note there are multiple sections with currency values as well as charges with a currency amount inside that should be ignored through Regex. Spacing/negative/$ symbols should all be accounted for and ignored as well with Regex.