How to Turn a Scanned Table into an Editable Table in InDesign

How to Turn a Scanned Table into an Editable Table in InDesign

A supplier sends a price list as a scanned PDF. A client sends a photo of a printed specification sheet. The data is right there on the page, but you cannot select it, so someone retypes it cell by cell. That is slow, and every retyped number is a chance for an error.

Table OCR solves this. Here is how it works and how to get a clean result.

Do you need OCR at all?

Check the PDF first: open it and try to select a number in the table.

  • If you can select the text, the PDF was exported from another program and the characters are already in it. Copying can work for a small, simple table. Columns often arrive in the wrong order or run together, though, because a PDF stores the position of each word, not cells.
  • If you cannot select anything, the page is a picture: a scan, a photo or a flattened export. Only OCR can read it.

In both cases, table OCR gives you rows and columns instead of loose text, which is what you need in a layout.

What table OCR actually does

Ordinary OCR recognises characters and gives you a block of text. Table OCR goes a step further: it detects rows, columns and cell boundaries, so the result is a table and not a paragraph with numbers in it. That structure is what makes the output usable in a layout.

From scan to InDesign table

With our Tables Extractor for InDesign the steps are short:

  1. Open the panel in InDesign and choose the PDF or image.
  2. Select the pages you want to process.
  3. Review the extracted table in the preview.
  4. Insert it. The result is a native InDesign table, so you can apply your own table and cell styles.

The same extraction is available where your team works: Tables Extractor for Jira and Confluence.

How to get clean results

  1. Start from the best source you have. A PDF exported from the original file beats a scan, and a scan beats a phone photo.
  2. Scan straight and at a reasonable resolution. 300 dpi is a good baseline. Skewed pages are the most common cause of shifted columns.
  3. Crop to the table. Headers, footers and surrounding text add noise.
  4. Watch merged cells and multi-line cells. These are the hardest structures to detect. Check them first in the preview.
  5. Proofread the numbers. OCR can confuse 0 and O, 1 and l, or a decimal comma and a point. Compare totals with the source where you can.

When the result is not right

What you seeLikely causeWhat to do
Values shifted one column acrossThe page was scanned at an angleStraighten or rescan the page, then extract again
Two products in one rowA cell with two lines of text was read as one rowSplit the row in the preview or after inserting
An extra empty columnA ruling line or a wide gap was read as a columnDelete the column in InDesign
1.250 where the source says 1,250The source uses another decimal conventionUse Find/Change on that column, then proofread
The header split over two rowsMerged header cellsMerge the cells again and convert the row to a header

Fix structure first, then values. Once rows and columns are right, a find and replace on one column is quick; the other way round, every structural fix can undo a correction.

After the import

Because the result is a real table, the rest is normal InDesign work: apply a table style, set column widths, and link it to your paragraph styles. If text is cut off in the new cells, see why text disappears in InDesign table cells, and for a table longer than one page, repeat its header row. And once the figures are in a real table, you can chart them: DataInk turns an InDesign table into a native, editable chart that stays linked to it.

Dealing with documents that no standard tool reads well, such as forms, invoices or technical data sheets? Talk to us. We build custom extraction and automation tools.

This article is part of our InDesign tables guide, which covers a table from import to print.

Sources

Frequently asked questions

Can InDesign convert a scanned PDF table into a table by itself?

No. InDesign places a PDF as a graphic and does not recognise the text in it. You need OCR, either in a separate tool or in a panel such as Tables Extractor for InDesign, which inserts the result as a native table.

What resolution should I scan a table at?

300 dpi is a good baseline for printed tables. Small type, such as footnotes or 6-point figures, benefits from a higher resolution. A straight page matters more than extra resolution.

Is OCR output accurate enough to print?

Not without a check. OCR can confuse similar characters, such as 0 and O or 1 and l, and decimal separators. Proofread the numbers against the source and compare totals before the table goes to print.

Oussama Touzni is part of the team at Lingway, which makes plugins for Adobe InDesign, Illustrator, Photoshop and After Effects. LinkedIn