You have 300 pages of supplier PDFs and a deadline. Here is what you should actually end up with: one CSV file where every SKU appears once, with its price, currency, unit of measure, and a link back to the page it came from. Open it, sort by article number, and the duplicates and gaps sit right there in the rows instead of hiding somewhere across twelve files.
That is the goal of this build: a price table from supplier PDF price lists that you can trust enough to buy against. Not a converter you run once and pray over — a small pipeline you can re-run when the next batch of PDFs arrives, with a human sign-off step built in.
A quick word on why the obvious approach fails, because it shapes the whole design. Converters break on merged cells, wrapped product names, and scans. A price that belongs to row 14 drifts into row 15's column, and nobody notices until the purchase order goes out at the wrong number. The fix is not a better converter. It is a sequence: classify each file, extract with coordinates, normalise into one schema, then check a sample by eye.
What do I actually get at the end, and how do I know it works?
You get three files and one screen.
normalized.csv— the master table:sku, name, unit, price, currency, valid_from, source_file, source_page. One row per unique SKU + unit pair.conflicts.csv— every place where the same SKU showed up with different prices, or where a price existed but the SKU was missing (or the reverse).report.txt— per-file counts: how many rows extracted, how many had a text layer, how many were scans, how many failed.
The screen is your sample review: 20 rows per source file, picked at random, sitting next to a crop of the original PDF page. You eyeball them, tick them off, and only then does the CSV become "approved."
How you know it works: you take three SKUs you know by heart — one cheap, one expensive, one with a weird unit like "per 100 m" — and check they land on the right price. If those three are right and the sample is clean, the file is probably right. Not guaranteed. Probably. That gap is why the sample exists.
What does the build consist of, step by step?
Five steps. Each has an owner — either the AI writes something, or you decide something. A step is not done until its check passes.
Step 1 — Sort the PDFs into two piles (AI suggests, you confirm)
Not every PDF is the same animal. Some have a real text layer you can select with the cursor. Some are scans — pictures of a printed page. Some are a nasty hybrid: a text layer over a scan, where the text is garbage from an old OCR pass.
The AI writes a short classifier that opens each PDF, pulls the text of a few pages, and checks whether the characters are real words or mush. A practical signal: if the extracted text has a high ratio of letters to weird symbols and contains your supplier's column headers ("Артикул", "SKU", "Price", "Цена" — whatever they use), it has a usable text layer. More on the topic: “Comparing Supplier Quotes: How to Consolidate RFQs from Emails into a Table and Spot Price Increases”.
Your job: look at the classifier's output list and confirm the split. Twenty seconds per file, and it saves you from feeding a scan into a text extractor that returns nothing and pretends it succeeded.
Step 2 — Extract with coordinates, not with hope (AI writes, you approve the column map)
This is the core. For text-layer PDFs, the extractor does not "read" the table — it grabs every word with its x/y position on the page, groups words into rows by y, then assigns each word to a column by x. That is how it survives merged cells and wrapped names: a product name that spills onto two lines still has a y-coordinate, and the price on the second line still has an x-coordinate that lines up with the price column.
For scans, you need OCR first (Tesseract is the usual free choice; check its current docs for the exact CLI flags for your language pack). Then the same coordinate logic runs on the OCR output. Expect more errors here — OCR misreads 0 as O and 1 as l, and that is exactly the kind of thing your sample review catches.
Your job, and it is the important one: approve the column map. The AI will guess that column 3 is the price and column 4 is the unit. You look at one page and confirm or correct it. If the supplier has two price columns (retail and wholesale), you decide which one you want. This is a business rule, not a technical detail — the AI cannot know it.
Step 3 — Normalise into one schema (AI writes, you set the rules)
Now every file's rows get squeezed into the same shape: sku, name, unit, price, currency. That means:
- Stripping currency symbols and thousands separators, then parsing to a number.
1 234,50and1,234.50must both become1234.50. - Mapping unit variants to one vocabulary. "pcs", "шт", "ea" all become
pcs. "per 100 m" stays asper_100_m— do not silently convert it to per-metre, or your quantities go off by 100. - Normalising the SKU itself: trimming spaces, upper-casing, and deciding whether a leading zero matters. It usually does. Ask the supplier.
The merge key is SKU + unit. Two rows with the same SKU but different units are different products, not duplicates.
Your job: write down the unit vocabulary and the SKU rules before the AI codes them. If you skip this, the AI invents a sensible-looking mapping that quietly merges "per kg" and "per 100 kg."
Step 4 — Merge and flag, do not overwrite (AI writes, you read the report)
When the same SKU + unit appears twice with the same price, keep one row. When it appears twice with different prices, do not pick a winner — write both to conflicts.csv with their source files and pages. You decide which is current (usually the newer file, but sometimes the supplier sent a correction). More on the topic: “Supplier Selection and Tenders: How to Avoid Costly Mistakes”.
Same for missing data: a price with no SKU, or a SKU with no price, goes to conflicts.csv, not into the master file as a blank.
Step 5 — Sample review (you, by hand, no shortcuts)
Twenty random rows per file, each shown next to a crop of the original page. You check: is the price the price? Is the unit the unit? Is the SKU intact, leading zeros and all?
This is not theatre. On a 300-page batch, twenty rows per file across, say, ten files is 200 checks — maybe an hour of work. It is the cheapest insurance you will buy all quarter.
If you would rather hand the whole thing over: asibiont.com takes such projects on turnkey — you describe the PDFs, the developer names a price, you top up the balance and get the working pipeline. Details at https://asibiont.com/en/subscription-tiers.
What access and data do I need before starting?
Less than you would think, and nothing exotic:
- The PDFs themselves, in a folder. That is the main input.
- Python (3.10 or newer is a safe floor) and the ability to
pip installpackages. For text-layer extraction,pdfplumberis the workhorse — it gives you words with coordinates. For OCR, Tesseract plus its Python wrapper. Pin your versions in arequirements.txt; do not let apip installdrift between machines. - Write access to a working folder for the CSVs and the page crops.
- A decision-maker who can say "column 4 is the wholesale price" and "leading zeros matter." That is usually you.
What you do not need: an API key for a paid PDF service, a database, or cloud storage. A laptop and a folder will do for the first run.
Where access is impossible: if the supplier's PDF is password-protected or DRM-locked, you cannot extract it — ask the supplier for an unlocked copy or a native Excel export. Many suppliers will send one if you ask; it saves everyone time. And if a "PDF" is actually a photo of a screen sent over a messenger, no pipeline will save it. Ask for the real file.
Where does this break, and what do I do about it?
Three real failure modes for this specific project:
1. The scan pile eats your time. OCR on a 50-page scanned price list with dense small print will produce errors, and fixing them by hand is slow. What to do: run OCR, then check the error rate on your sample before committing. If more than a small share of sampled rows are wrong, do not hand-fix — go back to the supplier for a text version. Hand-fixing a bad scan is the most expensive option and the one people default to.
2. Duplicates that look like different products. Same item, two SKUs because the supplier changed the article number mid-year, or one file uses "per pcs" and another "per pack of 10." What to do: the merge key (SKU + unit) catches exact duplicates. Fuzzy name matching catches the rest — but only as a suggestion in conflicts.csv, never auto-merged. A human confirms. Auto-merging by similar names is how you delete a real SKU and never notice.
3. The next batch arrives and the format changed. Suppliers reformat their price lists without telling anyone. What to do: keep the column map as a small config file per supplier, not buried in code. When the next batch fails, you look at the config, not the whole script. And keep report.txt from the last run — diffing it against the new one tells you instantly which file changed shape.
conflicts.csv as the sign the pipeline is honest.
How do I verify it by hand before trusting it?
Run these scenarios yourself. Each has a clear pass/fail sign.
| Check | How you run it | Pass sign |
|---|---|---|
| Known SKUs | Pick 3 SKUs you know the price of; search the CSV | Price and unit match your memory |
| Row count sanity | Compare extracted row count to the PDF's visible rows on 2 pages | Within a small margin, not half |
| Scan handling | Feed one known scan | It lands in the scan pile, not the text pile |
| Duplicate flagging | Duplicate one row deliberately in a test file | It appears in conflicts.csv, not merged silently |
| Unit integrity | Check a "per 100 m" SKU | Unit preserved as per_100_m, price not divided by 100 |
| Leading zeros | Check a SKU that starts with 0 | Zero still there |
If any of these fail, fix that step before moving on. Do not "fix it later in Excel" — that is where the mistakes go to hide.
What does this cost me in time and money?
The money is close to zero if you build it yourself: Python and Tesseract are free, and you already own a laptop. The real cost is time, and it depends on three things:
- How many files are scans versus text. Text-layer extraction is fast to build; OCR adds a day or two of tuning and a much higher review burden.
- How many suppliers have different layouts. Each distinct layout needs its own column map and its own sample review. Ten suppliers with ten layouts is meaningfully more work than ten files from one supplier.
- How much you review. The one-hour sample review is non-negotiable; skipping it is how you pay for it later with a wrong purchase order.
Rough order of magnitude for a first working version: a few days of build time for text-layer files, plus the review hour per batch. If you would rather not spend those days, a turnkey build through https://asibiont.com/en/subscription-tiers is the alternative — you name the scope, the developer names the price, you top up and get the pipeline.
The point of all this is not to automate away the human. It is to put the human exactly where judgement matters — the column map, the unit rules, the conflicts, the sample — and let the machine do the tedious coordinate-wrangling in between. Do that, and the next batch of price lists is a ten-minute job instead of a weekend.
If you would rather not build it yourself: we take such a project on — you describe the task, we build it and bring it to a working result, and the developer names the price. The payment goes through a balance top-up on the payment page.