To OCR email attachments automatically, let Mail Attachment Downloader save them and run its Make PDFs searchable (OCR) step on each one. Scanned PDFs and pictures come out as searchable PDFs, plain text or a words file, on your own system, as the emails arrive. Its Split PDF step cuts a scanner’s batch into one PDF per document.
Scanned invoices, delivery notes and signed contracts often arrive as pictures of paper: you can’t search them or copy from them. The examples use Contoso’s mailbox finance@contoso.com and scanned invoices from Acme.
What you need
- The edition: PRO Rules Server. OCR and Split PDF are steps in a PRO rule, and both need PRO Rules Server. The same edition runs the rules as a Windows service.
- Windows: Windows 10 or later, 64-bit, on a PC, a server or a cloud VM.
- The mailbox: Gmail, Google Workspace, Microsoft 365, Outlook.com, Exchange, or any IMAP or POP3 mailbox.
Step 1: A rule that saves the scanned attachments
On the PRO Rules tab, click New rule…. Under Which emails, click Add a condition and pick the emails with scans: the sender’s domain acme.example, the account your scanner sends to, or a mailbox folder. An attachment name condition of \.pdf$ keeps the rule to PDFs. Under Save, save the attachments to a folder such as D:\Finance\Scans.
New to PRO Rules? Save emails and attachments to folders walks through a first rule.
Step 2: Add the “Make PDFs searchable (OCR)” step
Under Then, click Add a step…, choose Files and double-click Make PDFs searchable (OCR). It adds a text layer to scanned PDFs and pictures.

Then set it up:
- File name: where the result goes, such as
{SAVE_PATH}\{FILENAME}_ocr, next to the saved scan. Don’t add an extension: .pdf, .txt or .json is added as the step saves. The attachment you saved stays as it is. - Engine: which OCR engine reads the pages (see the next section).
- Language: empty means English. Type language codes joined with +, such as
eng+deufor English and German. - “Only read pages that have no text”: a PDF that mixes typed pages and scanned pages keeps its typed pages as they are, and only the scans are read.
- “Straighten pages before reading”: a crooked page is turned level, and a page scanned sideways or upside down is turned upright before it is read.
- Save as: what the step makes (see below).
Click Test on a file… to read a scan of your own with these settings, then Open the test results folder to see the result. Word, Excel and other files are turned into page pictures first, so the step reads them too.

Which OCR engine should you use?
The Engine list says where each engine runs: on this computer, or in the service it sends the pages to.
- Tesseract 5: free and on your own system. Usually the most accurate choice that sends nothing anywhere. English, German, French, Spanish, Italian, Dutch and Polish are included; other languages need their language data file (such as
por.traineddata) in the folder that Open the language data folder opens. - Tesseract 3.05: the engine earlier versions used; steps saved before keep it.
- Windows OCR: free and on your own system. It reads the languages installed in Windows.
- Azure AI Document Intelligence: Microsoft’s Read model, in your own Azure resource. Add it once under Settings › Sources › OCR Providers with the resource’s Address and Key; Test reads a built-in sample page, so nothing of yours is sent. Then pick “Azure Read” as the engine and your connection as the Provider. The pages go to Microsoft as pictures, under your own Azure account and prices.
- AI vision: an AI model that reads pictures, such as OpenAI, Claude, Gemini or your own AI server, reads each page. It gives the text without its exact place on the page; a searchable PDF still holds the text, spread down the page, so it can be found and copied.
Keys are kept encrypted on your own system, never in a rule. A test with a cloud engine asks before it sends a page.
Searchable PDF, text or words file?
Save as offers three results:
- A searchable PDF: looks just like the scan, with the text under the picture. Windows search, SharePoint and document management systems can find it, and you can select and copy the text.
- Plain text (.txt): the text of each page, for a search index, a script or a database.
- The words with their positions (.json): each word with its place on the page, for a later step or your own program.
How do you split a scanned PDF into separate documents?
A scanner often sends a whole stack of paper as one PDF. Add Split PDF (Add a step… › Files) to cut it up.
- Split by pages: tick One file per page, or Only some pages to copy a range, such as page 1 to 2, to a new PDF.
- Split into the documents it holds: a new document starts where the pages say so. Each page is read for its page marker, such as “1 of 2”, and a document ID, such as the invoice number. Under A new document starts, choose On a page whose marker reads 1 (1 of 2) or When the document ID changes.
For the documents mode, show the program where the marker and the ID are with Open in the extraction wizard…: highlight the value on a page. Read scanned pages with picks the OCR engine for pages that have no text; it lists the engines on your own system, so for a cloud engine put an OCR step before Split PDF.
Under Check each document, the step can check that each document has the pages its marker says, and that its pages share one ID. When a check fails, choose Hold the PDF for review: nothing is saved, so a missing page is caught before anything is filed. Try it on a PDF… shows where each document starts, without saving anything.
In the documents mode, the steps you put under Split PDF run once for each document, so each invoice can be named, read and uploaded on its own.



Read invoice values from scanned PDFs
Steps you put inside the OCR step work on the file it made. So a Find fields with AI step inside it can read the invoice number, due date and total from the searchable PDF, and the steps under that one can save them to a database, send them to a web hook, upload the file or send a notification.

The Parser reads scans too. Add a scan as a sample with Add a file… and it is read by OCR; then highlight the values or describe them in plain words, add checks and pick where the values go. The rule the Parser saves puts an OCR step ahead of its reading steps. Building and checking a parser from scans works in PRO Parser; running it on scanned files needs PRO Rules Server. See extract data from emails and attachments.


Scans from a scanner folder, not email
Does your scanner save to a share instead of sending an email? With PRO Rules Client and up, a folder watch sends each new file in a folder or network share through your PRO Rules, as an email’s attachment does. Point it at \\nas\scans, and the same OCR and Split PDF steps run on the scans.

Run it around the clock
Install the Windows service with Schedule › Service schedule › Install service, and scans are read as they arrive, even when nobody is signed in. Each account’s History remembers what it has handled, so nothing is read twice.
Questions people ask
Can I OCR email attachments without sending them to the cloud?
Yes. Tesseract and Windows OCR run on your own system. Only Azure AI Document Intelligence and AI vision send pages out, to the account you set up.
Does OCR change the original attachment?
No. The step saves a new file with the name you give it. The attachment the rule saved stays as it arrived.
Can it OCR JPG, PNG and TIFF attachments?
Yes. The step reads pictures as well as PDFs, and can save each one as a searchable PDF.
Which edition do I need?
PRO Rules Server, for both Make PDFs searchable (OCR) and Split PDF. See pricing.
Try it: download Mail Attachment Downloader and start with the free edition, or compare the PRO editions, each with a 30-day money-back guarantee.
Related
- Make scanned PDFs searchable (OCR): features
- Convert email attachments to PDF
- Merge email attachments into a single PDF
- Invoice emails to your invoice processing software
- Process e-invoices from email: ZUGFeRD, Factur-X, XRechnung
Questions about this post? Contact us.