Convert scanned PDF form to Markdown: OCR recognition method

Tables in the scanned PDF cannot be copied directly. The text needs to be recognized by OCR first and then organized into a Markdown table. This article explains how to determine the PDF type, use OmniDoc to complete OCR and export the table, and how to check item by item after conversion.

Key points of this article

  • First determine whether the PDF is a scan. If you can select text, you don’t need OCR, just copy it directly.
  • OmniDoc can perform OCR on scanned PDFs and export the results to Excel as an intermediate step in organizing tables.
  • There is no standard way to automatically generate Markdown tables. You usually have to manually write vertical lines and short horizontal lines according to rows and columns.
  • Merged cells, cross-page headers and misidentified numbers must be checked one by one before the Markdown draft is written.
  • The more complex the table, the more important it is to keep the original file for comparison, and don’t just look at the converted text.

Converting tables in scanned PDFs to Markdown is something that many people encounter when writing technical documents, organizing reports, or taking notes. Scans are essentially pictures, and the text in the table cannot be directly selected and copied, so the first step is to recognize the text, and the second step is to write the rows and columns into Markdown table syntax. If these two steps are mixed together, it is easy to lose the meter in the middle or read the numbers wrongly.

This article is written for those who have a scanned PDF and need to put the table into a Markdown document. After reading, you can determine which route your file should take, use OmniDoc's OCR function to recognize text and export the table, then organize the results into a usable Markdown table, and finally do a round of verification.

The following method does not rely on the special functions of a certain format. As long as you can open the PDF and see the table content, you can follow it. No matter which tool the OCR recognition result comes from, it needs to be manually confirmed by comparing it with the original text, especially the numbers and units.

How to convert scanned PDF tables to Markdown? One sentence conclusion

First use OCR to recognize the text in the scanned document, export it into an editable table, and then manually write it into Markdown table syntax by row and column. This route is safer because recognition and typesetting are separated, and problems can be easily located.

your situationRecommended practicesreason
Text can be selected in PDF and tables can be copiedDirectly copy the table content and manually organize it into MarkdownThe text is already available text, no OCR is required
The PDF is a scanned copy, and the table rows and columns are simple (a few rows and columns)Perform OCR on PDF in OmniDoc, and directly handwrite the Markdown table after verificationThe table size is small, and manual sorting is faster than exporting and then cleaning.
The PDF is a scanned copy with many tables and rows and needs to be modified repeatedly.After doing OCR, export to Excel, check and organize in spreadsheet software, and then convert to MarkdownExcel is convenient for checking and adjusting cell by cell, and it is also convenient for copying rows and columns.
The table contains merged cells and cross-page headersFirst mark these positions in the original PDF, convert them and rewrite them as description text in Markdown.Standard Markdown tables do not support merging cells and need to be processed separately.
Tables are only a small part of the reportOnly perform OCR on the required pages, do not process the entire documentReduce irrelevant content and narrow the scope of verification

Before you start: Confirm these points first

First confirm whether the PDF is a scanned copy. Open the file and try to select a cell text in the table with the mouse. If you can select and copy, it means this is a text version of the PDF and does not require OCR; if you can only select a picture of the entire page, it is a scan. The two handle things differently, and a wrong judgment will lead to many detours.

Confirm the structure of the table. Count how many columns and rows there are, whether there is a header, and whether the header spans rows. Markdown tables can only have one row of headers, and the number of rows and columns in each row must be the same. If the original table has multiple headers, you must first think about how to compress it into one row, or keep it as a text description above the table.

Check scan quality. Whether the page is skewed, whether the handwriting is blurred, or whether the table lines are disconnected will affect the recognition results. When the resolution of the scanned document is low, errors in numbers and decimal points may occur. For pages with poor quality, you need to spend more time checking them after identifying them.

Have the original documents ready. Keep the original PDF and do not overwrite it. Every converted number must be returned to the original page for comparison. Both OCR and format conversion may make errors, and the original file is the basis for verification.

Clear the purpose of Markdown. If it is just for reading in notes, a simple table is enough; if it is to be rendered on a website or other system, confirm which Markdown syntax is supported by the target platform, especially alignment and escape characters.

Steps to perform OCR on scanned PDFs and export tables in OmniDoc

  1. Install the desktop client. Go to download.omnidoc.top to download the version suitable for your system (Windows, macOS or Linux), install it and open it.
  2. Open the scanned PDF. Open the file to be processed in the PDF editor, first turn to the page containing the table, and confirm that the content of the table can be seen clearly.
  3. Perform OCR recognition. Use the OCR function on the scanned PDF and wait for the recognition to complete. The scope of identification should be limited to the required pages as much as possible to reduce interference from irrelevant content.
  4. Check the recognized text. After the recognition is completed, try to select the text in the table. If it can be selected, the description text layer has been generated and you can proceed to the next step.
  5. Export to Excel. Use the PDF export function and choose to export to Excel format. The exported table will put the recognized content into cells to facilitate cell-by-cell verification.
  6. Check and organize in Excel. Open the exported file, check the numbers, units and table headers line by line against the original PDF, delete redundant empty rows and columns, and merge or split incorrect cells.
  7. Convert to Markdown table. Copy the organized content row by row and manually write out the Markdown table: the first row is the header, the second row is separated by short horizontal lines, and each subsequent row is separated by vertical lines to separate cells. You can also splice vertical bars into each row in Excel first, and then paste them into the Markdown editor, but be careful to check whether the cells contain vertical bar characters.
  8. Preview in Markdown editor. Put the result into any editor that supports Markdown to view the rendering effect. UniDoc web editor (app.unidoc.top) supports Markdown editing, and you can also preview it with the tools you usually use. Make sure the table has the correct number of columns and headers in the preview.

# check item by item after completion

After the conversion is completed, do not submit the manuscript directly, check it item by item according to the table below.

Check itemWhat do you think?What if there's a problem?
Number of rows and columnsCount row by row with the original table to make sure there are no missing or more blank linesGo back to Excel to complete or delete, and then regenerate the Markdown
Numbers and decimal pointsRandomly select more than a dozen numbers and check them one by one against the original PDFCorrect manually and re-check the same column of other numbers
Meter headVerify that the header text is complete and is not recognized as anything else.Modify the header directly in Markdown to ensure consistency with the original text
Units and symbolsCheck whether the percent sign, currency symbol and unit are reserved.Fill in the missing units and pay attention to full-width and half-width symbols
Merge cellsFind out the location of the original table across rows and columnsKeep the text description in the corresponding position, or break it into multiple lines and indicate
Vertical bar and escapeWhen previewing, see if the column is misplaced and whether the cell contains vertical lines.Replace the vertical bar character in the cell, or use another expression
Spread contentCheck whether the table is spread and whether the header is repeated on each pageRetain the header only once and merge the spread data into the same table

OCR identification results need to be checked manually, especially data such as amount, proportion, date and parameters. Machine recognition errors are usually concentrated in similar glyphs, such as 0 and 8, 1 and 7, periods and commas.

# Core comparison

There are three common ways to convert scanned PDF forms to Markdown, each of which has different scope of application.

MethodAn appropriate situationMain risk
Handwritten Markdown directly after OCRThe table is small, the rows are small, and only a few pieces of data are needed.It is easy to miss lines and read wrong numbers when there is a large amount of data.
Export Excel after OCR and then convertThe form is medium or large and needs to be checked one by one.After export, you still need to manually clean up the format, and there are many conversion steps.
Use a common online conversion site or scriptThe number of files is large, the precision requirement is not high, and the contents of the files are allowed to be uploaded.The quality of identification varies, which may involve the privacy of documents and need to be checked by yourself.

If the file contains confidential content, it is recommended that OCR and collation be done locally to avoid uploading to websites of unknown sources.

# frequently asked questions (FAQ)

1. How to tell whether the PDF is scanned or not?

In PDF, try to select the text in the table with the mouse. Can select and copy, is the text version; can only select the whole page image, that is, the scanned piece, need to do OCR first.

2. Can the Markdown table represent merged cells?

Standard Markdown tables do not support merging cells. The common treatment is to repeat the merged content into each line, or to indicate the scope of the merge in words at the bottom of the table to ensure that the reader can understand the original meaning.

3. What if the number identified by OCR is incorrect?

Check one by one against the original PDF, especially the decimal point, minus sign and unit. When regular errors are found, you can use the filtering function in Excel to find similar numbers and modify them, but each place still needs to go back to the original text to confirm.

4. The form is very long. Can you convert only part of it?

Sure. OCR selects only the pages you want, retains only the relevant lines after export, and then converts them to Markdown. In this way, the scope of checking is smaller and the probability of error is lower.

# Summary

Scanned version of PDF to Markdown form, the key is to "identify text" and "organize the form" into two steps. First confirm the file type, use OCR to identify and export to Excel, then manually write it into Markdown, and finally check the number, header and structure according to the checklist item by item, you can get reliable results.

Open OmniDoc to identify and translate scanned parts

Updated 2026-11-12