How to convert a PDF to CSV
- Click Open a PDF, or drop the file on the box. The PDF is read in your browser and never uploaded.
- Type the pages that hold the table, such as 1-3. The converter finds the table on each page and joins the pages into one table.
- Check the copper column lines drawn on the page. Drag a line to move it, double-click the page to add one, or select a line and press Delete.
- Choose the header row. Tick Clean numbers if you want amounts that a spreadsheet can add up.
- Click Download CSV or Download .xlsx. Copy for Excel copies the table as tab-separated text, ready to paste.
To see it work first, click Try a sample PO or Try a price list. The PDF reader is pdf.js, an open source library supported by Mozilla. It loads from a public CDN the first time you open a file.
How the converter finds a table in a PDF
A PDF records where each piece of text sits on the page. The PDF Association's FAQ notes that unlike HTML, PDF does not define tables in its graphical model. A tagged PDF can add table structure, but not every PDF has tags. This converter rebuilds the table from the positions of the words, in four steps.
- Rows from baselines. Words that sit on one baseline make one line of text.
- The table. The longest run of lines with three or more separate blocks of text is the table. The addresses above it and the totals below it are left out.
- Columns from gaps. A vertical gap that runs through almost every line of the table is a column boundary. Two columns 2 points apart still split, as long as the gap lines up from row to row.
- Wrapped lines. A line that holds only text joins the row above it, and so does a line that starts under a text column of that row. A description that wraps over two or three lines stays in one cell, even with numbers in it. A line with amounts that starts under a number column ends the table, which keeps a subtotal out. Check long descriptions against the PDF all the same.
When a table runs over several pages, the columns come from the first page, and every page with the same layout joins the table. A repeated header row is dropped. A page whose table has other columns is named in the status line and left out, so two tables never mix.
Read every emailed purchase order into your ERP
Tell Derik how purchase orders reach your order desk and which ERP they are keyed into. He will tell you what a four-week build would cover.
Start a conversationA worked example: a one-page purchase order
The sample is a purchase order from a conveyor builder to an industrial supplier, printed to PDF from a web page. Its eight lines sit between an address block and a block of totals. The converter keeps the header row and the eight lines and leaves the rest out. Three of the rows it returns:
| Line | Part number | Description | Qty | Unit | Unit price | Amount |
|---|---|---|---|---|---|---|
| 1 | TB-50-3 | Square tube 50 x 50 x 3 mm, 6 m length | 24 | ea | $86.40 | $2,073.60 |
| 3 | HB-M10-30 | Hex bolt M10 x 30, grade 8.8, zinc plated, box of 100 | 12 | box | $21.75 | $261.00 |
| 8 | DISC | Volume discount, as quoted | 1 | ea | ($245.00) | ($245.00) |
Line 3's description holds three commas, so the CSV puts it in double quotes to keep it in one cell. With Clean numbers ticked, $2,073.60 becomes 2073.6 and the discount of ($245.00) becomes -245. The eight amounts add up to $10,253.60, the subtotal printed on the PO, which is a quick way to check that no line went missing.
Clean numbers before they reach Excel
Amounts in a PDF carry formatting that a spreadsheet reads as text. With Clean numbers ticked, the converter writes them as plain numbers:
- Currency signs and thousands separators go, so $1,234.50 and 1 234,50 $ both become 1234.5.
- Negatives in parentheses or with a trailing minus get a leading minus, so (12.00) and 12.00- both become -12.
- A decimal comma becomes a point when the format leaves no doubt, as in 12,50.
Part numbers that hold letters or dashes stay as they are. A number with a leading zero, such as 00125, stays as text so the zeros survive, and percentages are left alone. The CSV follows RFC 4180: a cell that holds a comma, a quote or a line break is enclosed in double quotes. The CSV file is UTF-8 with a byte order mark. With Clean numbers ticked, the .xlsx file stores amounts as numbers, under a bold, frozen header row.
Scanned PDFs need OCR first
A scanned page is a picture of text. Adobe's Acrobat help notes that a scanned document holds only image data until text recognition adds a searchable text layer. This converter reads the text layer, and it says so when a PDF has none. For a short table, take a screenshot and read it with the image to text converter, which runs OCR in your browser. Check the numbers afterwards, because OCR can misread a decimal point.
Other ways to get a PDF table into Excel
- Excel. Data > Get Data > From File > From PDF imports tables with Power Query. Microsoft's list of data sources by Excel version shows it for Microsoft 365 on Windows.
- Adobe Acrobat. The Convert tool saves a PDF as an Excel workbook.
- ChatGPT. It reads a PDF you upload and can return a table as a CSV file. The file goes to OpenAI. Its help on data analysis warns that it may not extract exact values reliably from scans or tables that are images.
This page suits a PDF you would rather not upload, and a table you want to check row by row before it reaches a spreadsheet. For a supplier price list, it gives you a table to compare with your current costs in Excel.
Reading purchase orders on every order with AI
A converter handles one PDF at a time, and someone still checks every part number and price before keying the order. An order desk system does that work for each purchase order that arrives by email. It reads the PDF and matches each line to your item list and the customer's price. It flags what differs and drafts the ERP order for a person to approve.
See order entry automation for how ThriveAI sets it up. The guide to the sales order shows where a customer's PO lands in the ERP. Text extraction from images compares the ways to read documents into fields.