About this tool
This tool finds tables in a PDF by looking at where the words sit on each page, and gives them back as data you can open in a spreadsheet. It works on PDFs with real text, not on pictures of pages. Finding tables is a best guess and each one has a confidence score, so check the result. You can get one table as CSV (a plain table file) or all as an Excel workbook.
For example, you pull the tables of a financial report into Excel instead of retyping the numbers.
How to use it
- Choose this tool.
- Add your PDF.
- Choose the pages to look at, and the output: on screen, a CSV file, or an Excel workbook.
- If needed, choose which table to export and how sure the tool must be to keep one.
- Press Generate, then download or copy the result.
What you get back
You get the tables on screen, or a CSV or Excel file with the table rows and columns. You can download or copy it.
GOOD TO KNOW
Tables are found from text positions: ruled-line tables without gaps, merged cells and scanned pages are not supported (run /v1/pdfs/ocr first).
TEST IT LIVE
Try Extract Tables in the Studio
One click opens the Studio with this tool already selected. Add your file and see the result in seconds.
Family
PDFs
Plan
Free
Method
POST
Endpoint
/v1/pdfs/tables
Tool ID
pdfs.tables
Authentication
API key
Accepts
PDF
Background jobs
Yes
Usage group
Pdf
For developers
Use it from your code
cURL
curl -X POST "https://app.h2i.davixlabs.io/v1/pdfs/tables" \
-H "X-Api-Key: $DAVIX_H2I_API_KEY" \
-F 'file=@document.pdf' \
-F 'format=json' \
-F 'table=1' \
-F 'min_confidence=0.5'Node.js
const { DavixH2I } = require('@davixlabs/h2i-sdk');
const h2i = new DavixH2I({ apiKey: process.env.DAVIX_H2I_API_KEY, baseUrl: process.env.DAVIX_H2I_URL });
const result = await h2i.pdfs.tables({
"file": 'document.pdf',
"format": "json",
"table": 1,
"min_confidence": 0.5
});
console.log(result.data, result.requestId);PHP
<?php
require 'vendor/autoload.php';
$h2i = new \Davix\H2I\Client(['apiKey' => getenv('DAVIX_H2I_API_KEY'), 'baseUrl' => getenv('DAVIX_H2I_URL')]);
$result = $h2i->pdfs()->tables([
'file' => 'document.pdf',
'format' => 'json',
'table' => 1,
'min_confidence' => 0.5,
]);
echo $result->requestId;More in PDFs
