How to separate text and tables from the same PDF page

How to split a PDF page that contains both paragraphs and tables for extraction: first determine whether it is a digital (born-digital) PDF, then export the text and the tables separately, and finally check rows, columns, numbers, and cross-page content item by item.

Key Points of This Article

  • First, drag-select text with the mouse to check whether the PDF has a text layer; if the selection doesn't work, it is a scanned image and you need to run OCR before extracting.
  • Export the text portion to Word to preserve paragraph order and allow further editing.
  • Export the table portion to Excel so the numbers can be calculated directly, but delete any explanatory paragraphs that were mistakenly picked up.
  • After extraction, check the number of rows and columns, number formats, merged headers, and tables spanning multiple pages; if you find misalignments, go back to the original image to compare and correct them.

Many PDF pages contain both body paragraphs and a data table, such as experimental results in a paper, itemized quotes in a contract, or breakdown figures in a financial report. When you copy directly, the text and the table often get jumbled together: the table's columns turn into broken short phrases, and a string of numbers gets mixed into the paragraphs. When you want to use both parts, you need to separate them first.

This article covers how to extract text and tables from a PDF, for pages where text and tables are mixed together. After reading it, you'll be able to decide what to do first, know how to use OmniDoc's PDF export feature to export text to Word and tables to Excel, and know how to verify the results once they're out.

How do I extract text and tables from the same page? One-sentence conclusion

First determine whether the PDF is an electronic version with selectable text. Then export the whole page to Word while preserving the text, and export the tables separately to Excel as computable data. Scanned documents must go through OCR first; otherwise neither part can be extracted.

Your situationRecommended practicesCause
The page allows text to be selected, and tables have borders or aligned text.Export the whole page to Word to get the text, then export to Excel to get the tables.The text layer is complete; Word is better suited for preserving paragraph order.
The page is a scanned image, so text can't be selected.First perform OCR, then process it according to the previous line.The PDF has no text layer, so exporting it directly only yields images.
Only need the numbers in the tableBased primarily on the Excel results; delete unrelated paragraphsNumbers can be sorted directly and summed.
Continue rewriting or translating textEdit the text in Word; save the tables separately as a backup.Word is easy to edit, and table figures are stored separately.
Many cross-page tables or merged cellsManually verify page breaks and headers after exportSpanning pages and merged cells can easily cause rows and columns to become misaligned.

Before you begin: confirm these points first

  1. Confirm whether the PDF is born-digital or a scan. Drag your mouse across a passage of text on the PDF: if you can highlight and select it, the file has a text layer; if the selection won't take, the pages are images. In a scanned document, the text and tables are just pixels, so you must run OCR first, or the exported result may be empty or garbled.
  2. Check the table boundaries. See whether the table has outer border lines and alternating row shading. Tables with clear boundaries usually keep their columns aligned after export; "fake tables" aligned only with spaces tend to fall apart when exported and need more manual adjustment.
  3. Count the table's pages and merged cells. For tables that span pages, note where the page breaks fall. Merged header cells must be checked against the original image in the result, otherwise the data may not line up with the columns.
  4. Decide what the output is for. For data analysis, treat the Excel file as the primary result; for writing a report or editing text, treat the Word file as the primary result. The purpose determines which version is the main result and which serves as a supplement.
  5. Keep a copy of the original file. Do all operations on a copy and leave the original PDF untouched, so you can start over if something goes wrong.

Steps to separately export text and tables in OmniDoc

If you only need the tables, OmniDoc's free extraction is simpler: upload a PDF or scanned document, and the tables are output directly as Markdown tables. The row and column structure is also saved in document.json, and scanned documents are first processed for text and table recognition. You need to log in to an OmniDoc account (registration is free), a single PDF can be up to 501 pages, the monthly quota is unlimited, and free jobs have to wait in a queue. Below is the approach using the desktop client, which suits cases where you need Word or Excel files or want to edit the text in the PDF first.

  1. Upload this PDF to omnidoc.top, or open it in the desktop client. If it is a scanned document, first use the OCR feature to recognize the text, and wait for recognition to finish before continuing.
  2. In the PDF editor, go to the page that contains the table and confirm the table boundaries and the position of the heading. If you only need some of the pages, use the page operations to delete unrelated pages so the export contains only the required content.
  3. Export to Word. Export this page as a Word document: paragraph text will appear as body text, and tables are usually kept in the document as tables.
  4. In Word, check the text portion: whether the heading levels are correct, whether the paragraph order is mixed up, and whether headers and footers have crept into the body text. Delete any content you do not need.
  5. Export to Excel. Export the same PDF to Excel once more, open the generated worksheet, and check whether the table data has landed in the cells.
  6. Tidy up the table in Excel: delete paragraph descriptions that got in by mistake and keep the header row and data rows separate. If numbers are squeezed into the same column, use Excel's Text to Columns feature to split them by space or tab.
  7. Save the two results separately, with the source page number in the file name, for example "Report_Page5_Text.docx" and "Report_Page5_Table.xlsx", so they are easier to find later.

Verify item by item after completing

After receiving the two results, do not use them directly. First, check them item by item using the table below.

Inspection itemHow do you see it?What should I do if I have a problem?
Is the text complete?Compare the sentences near the beginning, the end, and the page numbers against the original PDF.Missing paragraphs are most common in scanned documents; redo the OCR before exporting.
Table row and column countCount the table's header columns, then check each row's data against the original table.When columns are misaligned, go back to Excel and manually split or merge the cells.
Do the numbers match?Spot-check decimal points, thousands separators, negative signs, and percent signsFix formatting; for any numbers you're unsure of, refer to the original PDF.
Table headers and merged cellsAre the spanning headers still in their corresponding positions?Manually complete the table headers, keeping the original image as a reference
Spread tableCheck whether the table header repeats at page breaks, and whether the data continues correctly.Merge the two pages of data into the same worksheet
Is the content mixed up?Check whether table content has gotten mixed into the Word document body textRemove the duplicated parts, keep only one copy.

OCR and exports can both introduce errors, especially in numbers, decimal points, and technical terms. Before using important data in a report or calculation, please check every item against the original PDF.

❓ Frequently Asked Questions (FAQ)

1. Table data all squeezed into one column after exporting to Excel — what should I do?

Usually the original table has no clear column lines, so the content was recognized as whole lines of text. Go back to Excel and use the Text to Columns feature to split by space or tab; if the data is still misaligned after splitting, enter it manually based on the original image.

2. Why does copying a table directly produce messier formatting than exporting it?

Copying only captures the selected text in sequence, so the row and column relationships in a table are easily lost. Export generates files based on the page structure, which generally preserves rows and columns better than manual copying, but you still need to check each item individually.

3. What should I do if table recognition results from a scanned PDF are inaccurate?

First check whether the original image is clear, since a blurry scan will directly affect the recognition results. Compare each key number against the original image one by one, and if necessary, switch to a clearer scan and run OCR again.

4. I only want a table, no text—how do I do that?

After exporting to Excel, simply delete the irrelevant content and keep only the table area. If you may need the text later, it is recommended to keep a Word version as a backup.

📝 Summary

When text and tables are mixed on the same PDF page, first determine whether the file is an electronic (digital) version, then export them separately to Word and Excel, and finally check rows, columns, numbers, and cross-page content item by item. Once they are split and saved this way, rewriting and calculations become much easier.

Open OmniDoc free extraction to convert documents into Markdown and JSON

Updated 2026-11-29