← All microservices
PDF to text
PDF
Extract the text from a PDF, keeping the layout or as plain reading order, for all pages or a range.
Create an account
It comes with 10,000 free tokens a month.
What it does
- Keep the layout, or plain reading order
- Any page range
- Plain text, or JSON page by page
- Says clearly when a PDF is a scan with no text
Good for
- Parsing invoices and statements
- Search indexes
- Feeding documents to other tools
Layout mode suits tables and invoices, where columns matter. Reading order suits articles and search.
Try it now
No account needed. Up to 10 runs a day here, files up to 2MB, and nothing is kept.
Example
POST https://bloodweb.net/api/v1/pdf-to-text
curl -H "Authorization: Bearer YOUR_KEY" -F file=@report.pdf -F pages=1-3 https://bloodweb.net/api/v1/pdf-to-text -o report.txt
Complete, tested code for this call: curl · Node.js · Python · PHP
Options
| Name | Description |
|---|---|
filefile |
The PDF, up to 50MB. |
pages
|
Pages to read, such as 1-3,5 or 8- (to the end). Default: all |
layout
|
Keep the physical layout (columns and tables stay lined up). Off gives plain reading order. Default: true |
format
|
text: one plain-text body, pages separated by form feeds. json: {"pages": [{"page": 1, "text": "..."}]}. One of: text, json Default: text |
Returns
text/plain or JSON. A scanned PDF has no text layer and returns empty text (X-Text-Found: false).
Limits
500 pages per call.
Good to know
- Your files exist on our server only while the call runs, and are deleted when it ends. We keep a record of the call, never the file.
- A call that fails costs nothing.
- Run by Bloodweb (ABN 65 757 166 166) in Australia, under the microservices terms.
- Questions go to support@bloodweb.net, and we reply within one business day.
- Every service is checked every hour: see the status page.