Why not always OCR?
In a previous post I talked about how OCRing the PDF would solve the problem I was facing. However, I chose to process the PDF with a different method. Someone in the hacker news comments had this to say.

This person is not wrong, but I’d like to point out some other scenarios where reading the PDF is a better solution than using OCR to process the PDF.
Identifying statements
When processing a bank statement, the first thing we do is classify the statement into a document_type. Once it is classified we run special rules for that document_type.
Why are all the amount values negative?

A few days ago I got this email from a customer. Something about all the amounts coming out as negative. I converted their PDF to verify the issue they described.
PDF Sample

Converted Sample

The customer was right, all the amounts were coming through as negative. Pretty weird. Interestingly the column headers also end with minus sign characters. I then opened up the PDF in a debugging tool called PDFSnake to see how the text is encoded. Let’s look at how the values “$110.00-” and “$1,527.57” are encoded.
Psst! Want to see a cool bug?
Yesterday I was going through error reports and I saw this email.

At first I was kind of annoyed, often users like to merge multiple PDFs into one large PDF to abuse my free plan and convert more than one PDF a day for free. Then I looked at the PDF and thought “Ah actually this is supposed to convert correctly even if the PDF has been merged into one mega PDF”.
When You Don't Know How Your App Works
On Monday morning I was going through emails and see one from a user telling me the forgot password form isn’t working. That’s weird, it’s the kind of thing that doesn’t really break. I try resetting their password for them using the form, the form errors out. That’s weird. It turns out this user’s email address was capitalised, and the query code that fetches a user by email address sends in the lowercase value of their email.
PDF Tales - Extracting Text You Can't See
A few months ago I got an email from a customer in Dubai asking me to help extract transactions from a PDF bank statement. This is pretty normal. I get about ten of these emails a day. I had a look at the PDF and thought:
“Damn, banks are even stupider than I thought.”
The statement was basically an excel file, exported out into a PDF. It’s so annoying when people do that, because most people would rather have the Excel/CSV file. Imagine the table is rendered in the PDF like this:
Bank Statement Converter Book
I have written a book about how I coded Bank Statement Converter. You can read it for free here.
Week 101 - February Sales Numbers
Plumpbird: February is the shortest month of the year. Did you make any damn money?
Net Volume

January 2023 - $59390 HKD
February 2023 - $57878 HKD
A bit of a drop, but February has three fewer days than January, so you could chalk it up as a win.
Monthly Recurring Revenue

January 2023 - $50408 HKD
February 2023 - $57820 HKD
A very nice increase. This means MRR has now exceeded $7000 USD.
Week 97 - Revenue Numbers
Plumbird: It’s been a while since you’ve shared sales numbers. How’s the Bank Statement Converter doing?

It’s been pretty good.
Net Volume

I like this number, because it’s the number of dollars that go into my bank account.
November - $53,531 HKD
December - $55,525 HKD
January - $59,390 HKD
It’s a nice steady increase. The best month we’ve had was $59,507 in August 2022. That month was a bit of an outlier because I charged one client $40,000 HKD for some one off work.
Week 84 - October Sales Review
Normally this blog goes out on a Monday, but since the month ended on a Monday I figured it would be better to wait a day. Let’s go through October’s stats.
In September we brought in $46,736 HKD and this month we brought in $46,846 HKD. That’s not very much growth!
We ended October with MRR at $40,455. We ended September with MRR of $37,521.
Active subscribers has gone from 212 to 225.
Week 83 - $5000 Monthly Recurring Revenue

On October 21st monthly recurring revenue (MRR) exceeded the $5000 USD mark. We hit $4000 MRR on September 12th, so it took only 40 days to earn the last $1000 MRR. If MRR continues to grow at this speed, we should hit $6000 MRR on December 1st 2022.
Plumpbirds: We’re getting tired, we don’t want any more MRR.
Last Week’s Goals
✅ 1. Contact 100 users
I emailed every user who signed up in the previous week. Sadly I only got three responses. Next time I do this I’ll write a different email.