About this tool
This tool takes the text out of a PDF so you can copy it, search it or use it elsewhere. It reads the text that is already in the file, so a scanned PDF that is only pictures gives nothing; use the scan reader tool for that. You can keep the page layout, or get a simple version with headings and lists as Markdown or HTML.
For example, you copy the words of a long report into a Word document to rewrite parts of it.
How to use it
- Choose this tool.
- Add your PDF.
- Choose which pages you want.
- Choose the form: plain text, or text with headings and lists as Markdown or HTML. For plain text you can keep the layout.
- Press Generate, then copy or download the text.
What you get back
You get the text on screen and as a file you can copy or download.
TEST IT LIVE
Try Extract Text 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/text
Tool ID
pdfs.text
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/text" \
-H "X-Api-Key: $DAVIX_H2I_API_KEY" \
-F 'file=@document.pdf' \
-F 'pages=all' \
-F 'layout=true' \
-F 'format=text'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.text({
"file": 'document.pdf',
"pages": "all",
"layout": true,
"format": "text"
});
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()->text([
'file' => 'document.pdf',
'pages' => 'all',
'layout' => true,
'format' => 'text',
]);
echo $result->requestId;Documentation
Guides that use this tool
More in PDFs
