Menu

Building a Bulk Business Card Import with OCR — The “Multiple Cards per Page” Trap
📰

Building a Bulk Business Card Import with OCR — The “Multiple Cards per Page” Trap

DEV Community: rails·Kaziu·about 6 hours ago
#VR2g7aO1
#devtorails#devto#dev#cards#card
Reading 0:00
15s threshold

Introduction

Typing all those paper business cards you pile up at trade shows into a CRM by hand is a real chore. So at work, I built a feature where "you upload a PDF (or images) stuffed with business cards, and it automatically bulk-registers the company and contact data."

At first I thought, "Just throw it at OCR and we're done." But once I actually tried it, I realized that OCR isn't as all-powerful as you'd think , and that the design decision of where to split the processing is the real key. In this post I'll share those key points, plus the problem I agonized over the most: "What do we do when a single page has multiple business cards lined up on it?"

The Overall Flow

Upload a file (PDF / JPEG / PNG)

Validate on the server side (format, size, page count)

Create an "importing" history record and return a response right away

Run the heavy work (OCR → structuring → create/update) in a background job

The frontend polls the history ID and shows progress

The point is to cleanly separate "accepting"…

Continue reading — create a free account

Join HashtagPLUS to read full articles, follow hashtags, vote, and join the conversation.