Letter Scanning Using iOS

A little over a year ago I discussed how I scanned the letters that I sent and received and then filed these scans away for future reference. This system has worked well except for one aspect, it requires that I process the letters at my desktop computer. This February's InCoWriMo meant that there was a lot of correspondence travelling through the house and the friction of having to make a trip to the scanner before sealing an envelop got me looking for an alternate solution. Since my iPhone is always near by, I decided to look for an iOS solution to my task.

The camera on my phone is 12 MP, plenty detailed enough to capture the content of a letter, so the search was on for software that used the camera as a scanner to create multi page PDF documents. Smile Software's TextExpander was already part of my existing system so it was easy to choose the company's PDFpen Scan+ as the scanning software. Being as both products are made by the same company, PDFpen Scan+ has built in hooks for the TextExpander snippets that are used for the file renaming. More on this below.

When you start up PDFpen Scan+ you are greeted with a grid of the documents that you have scanned with the software. Below this is the camera icon that takes you into scanning mode. 

PDFpen Scan+ in the process of acquiring the scan of the post card.

PDFpen Scan+ in the process of acquiring the scan of the post card.

Once you are in scanning mode, the software will start looking for an object that looks like a piece of paper and automatically photograph it. This automatic feature can be turned off but I run with it. Once you have photographed the pages of the letter, you exit capture mode and the images are processed into a multi page, de-skewed PDF file. 

At this point I employ TextExpander to provide consistent file renaming for all of my letters. In past, when using my Mac, I had used drop down lists in the text expansion snippet for the sender and receiver portions of the filename but as the number of people that I wrote to increased, the lengths of these lists increased and this feature became less useful. 

I have now standardized on two separate text expansion snippets; one for sent mail and one for mail that has been received. The real difference between the two is where the cursor rests after the expansion has been performed. In the example below "sslet" triggers the "sent letter" expansion and the "rrlet" triggers the received letter expansion. With the cursor in this resting position, I simply type the other person's name and press save.

Cursor position after the expansion has been performed.

Cursor position after the expansion has been performed.

Since PDFpen Scan+ has native TextExpander functionality built in, it is super easy to do all of this with the on-device software keyboard.

With the file renamed, it is now time to export it off of device and process it with my archiving routine. This is done by sending the PDF to my Mac via Dropbox.

Now that the scanned letter is synced to the Mac, it is time to file it away. At this point a program called Hazel kicks in. It specializes in looking at files contained within a specific folder and performing actions on them based upon a recipe that you create. In this example, Hazel sees the "Letter-" flag at the beginning of the file name, as well as a date at the end, and the program knows to perform the "Move Letters" recipe that I have created for my scanned letters.

The Hazel recipe that I use.

The Hazel recipe that I use.

This Hazel recipe skips to the end of the file name to find the "Year" and "Month" information that has been appended there. You will have to create a custom FileNameDate token to read this date but it is easily done as is shown below.

How to build the custom token.

How to build the custom token.

This FileNameDate token is used again for naming the subfolders into which the scanned letter is moved. Since we only want to use the year and month portion of the token to name the subfolders, we have to edit the date pattern. The date pattern looks like this for the subfolder.

So we now have a Hazel recipe that reads the file name of scanned letter that is sitting in the "Scans" folder and then takes this information and uses it to move the scanned letter to the "Paul's Letters" folder in Dropbox. This "Paul's Letters" folder contains sub folders with YYYY-MM names. If an appropriate YYYY-MM folder doesn't exist, Hazel creates it.

Everything is now filed away and it was all done automagically.

Everything is now filed away and it was all done automagically.

While this revised system doesn't produce image quality as good as using a proper scanner, the results are plenty good enough for my needs and I can do it while away from my desktop computer.