n8n's Extract From PDF returns "text": "" on a scan: it reads the text layer and runs no OCR. parserkit reads the scan with OCR for $0.02 a page, 50 pages free, files up to 25 MB and 250 pages.
n8n Extract from File returns "text": "" for a PDF
On n8n 2.46.6, Extract From PDF gives an empty text field or an error in three cases: a scanned page, Max Pages left at its default of 0, and an Input Binary Field that names the wrong field. Each has a fix below. Even a clean run hands you plain lines, not fields; one HTTP Request to parserkit returns the invoice fields and line items, checked.
Error fixesUpdated
{
"numpages": 1,
"numrender": 1,
"info": {
"PDFFormatVersion": "1.4",
"Language": null,
"EncryptFilterName": null,
"IsLinearized": false,
"IsAcroFormPresent": false,
"IsXFAPresent": false,
"IsCollectionPresent": false,
"IsSignaturesPresent": false,
"Creator": "Chromium",
"Producer": "Skia/PDF m147",
"CreationDate": "D:20261021090000+00'00'",
"ModDate": "D:20261021090000+00'00'"
},
"text": "",
"version": "6.3.289"
}Causes
Why it happens and the fix for each
The PDF is a scan
In
n8n-nodes-base2.46.6, theExtract From PDFoperation callspdf.jsgetTextContenton each page and never runs OCR. Oninvoice-hollins-scan.pdf, a 1-page scan, our node succeeded and returned"numpages": 1,"text": ""and"version": "6.3.289". You can check for a missing text layer by runningpdffontson the file, which listed no fonts for our scan (see our guide on empty PDF text extraction), and if your PDF has no fonts, send the binary to parserkit'sPOST /v1/parse, which runs OCR and returns the fields.pdffonts on the scan $ pdffonts invoice-hollins-scan.pdf name type encoding emb sub uni object ID ------------------------------------ ----------------- ---------------- --- --- --- ---------Max Pages is set to 0
When you add the
Max Pagesoption ("Maximum number of pages to include") inExtract From PDF, its default value is0. Becausen8n-nodes-base2.46.6 only reads pages whenmaxPages !== 0, adding that option at0made our 1-page text PDFinvoice-ridgeback.pdfsucceed with"text": ""even whileJoin Pagessat at its defaulttrue. Open the node options and either deleteMax Pagesor set it to a number above0.Input Binary Field does not match the file
The
Input Binary Fieldoption tellsExtract From Filewhich field holds your binary file, and it defaults to'data'. WhenRead/Write Files from Diskput our file indataand we setInput Binary Fieldtoattachment_0, the run failed withNodeOperationError: The item has no binary field 'attachment_0' [item 0]. Check the binary property name from the previous node, such as'attachment_0'when using the Gmail Trigger withDownload Attachmentsturned on, and put that exact name intoInput Binary Field.Extract from File error { "message": "The item has no binary field 'attachment_0' [item 0]", "description": "Check that the parameter where you specified the input binary field name is correct, and that it matches a field in the binary input", "name": "NodeOperationError", "level": "warning", "context": { "itemIndex": 0 } }A text PDF gives lines, not fields
When the PDF has a real text layer,
Extract From PDFdumps the page as plain lines without fields or table structure. Oninvoice-ridgeback.pdf, a 1-page text PDF, our run returned raw text lines like"Coffee bag labels, matte, 3 by 4 in 5000 0.09 450.00". The description, quantity, unit price and amount run together in one line, so getting fields out means a parser per supplier layout. Pass the file to parserkit's invoice parser API instead and get fields and line items with every total checked.
Example
The same scanned invoice through parserkit
This is the file n8n returned "text": "" for. The invoice preset read it by OCR and returned the fields and line items, each row and total added up again.
POSTapi.parserkit.com/v1/parse?wait=60
curl "https://api.parserkit.com/v1/parse?wait=60" \
-H "Authorization: Bearer $PARSERKIT_API_KEY" \
-F file=@invoice-hollins-scan.pdf \
-F preset=invoiceimport os
import requests
with open("invoice-hollins-scan.pdf", "rb") as file:
res = requests.post(
"https://api.parserkit.com/v1/parse",
params={"wait": 60},
headers={"Authorization": f"Bearer {os.environ['PARSERKIT_API_KEY']}"},
files={"file": file},
data={"preset": "invoice"},
)
job = res.json()
print(job["verification"]["status"], job["verification"]["coverage"])import { openAsBlob } from "node:fs";
const form = new FormData();
form.append("file", await openAsBlob("invoice-hollins-scan.pdf"), "invoice-hollins-scan.pdf");
form.append("preset", "invoice");
const res = await fetch("https://api.parserkit.com/v1/parse?wait=60", {
method: "POST",
headers: { Authorization: `Bearer ${process.env.PARSERKIT_API_KEY}` },
body: form,
});
const job = await res.json();
console.log(job.verification.status, job.verification.coverage);{
"id": "job_mcbztlqmko6mbq7kk94i",
"status": "succeeded",
"preset": "invoice",
"pages": 1,
"cost_usd": 0.02,
"verification_status": "verified",
"data": {
"invoice_number": "HB-0518",
"issue_date": "2026-10-21",
"due_date": "2026-11-20",
"purchase_order": "J-2291",
"currency": "USD",
"vendor": {
"name": "Hollins Brook Plumbing & Heating",
"address": "62 Barre St, Montpelier, VT 05602",
"email": "office@hollinsbrook.example",
"phone": "(802) 555-0163"
},
"customer": {
"name": "Dana Whitcomb",
"address": "118 Maple Ave, Barre, VT 05641"
},
"line_items": [
{
"description": "Labor, licensed plumber, hours",
"quantity": 3.5,
"unit_price": 95,
"total": 332.5
},
{
"description": "Pipe insulation, 6 ft",
"quantity": 8,
"unit_price": 4.25,
"total": 34
},
{
"description": "PEX pipe 3/4 in, 10 ft",
"quantity": 3,
"unit_price": 18.9,
"total": 56.7
}
],
"subtotal": 591.8,
"taxes": [
{
"label": "Sales tax 6% on 169.30",
"rate": 6,
"base": 169.3,
"amount": 10.16
}
],
"tax_total": 10.16,
"grand_total": 601.96,
"amount_paid": 150,
"amount_due": 451.96,
"payment": {
"terms": "Net 30"
},
"notes": "Thank you. Sales tax applies to parts only."
},
"verification": {
"status": "verified",
"math_balanced": true,
"coverage": {
"values": 46,
"checked": 46
},
"checks": [
{
"kind": "line_total",
"path": "line_items[0].total",
"status": "pass",
"expected": 332.5,
"actual": 332.5,
"difference": 0,
"message": "quantity x unit price"
},
{
"kind": "line_total",
"path": "line_items[1].total",
"status": "pass",
"expected": 34,
"actual": 34,
"difference": 0,
"message": "quantity x unit price"
},
{
"kind": "line_total",
"path": "line_items[2].total",
"status": "pass",
"expected": 56.7,
"actual": 56.7,
"difference": 0,
"message": "quantity x unit price"
},
{
"kind": "line_total",
"path": "line_items[3].total",
"status": "pass",
"expected": 49.2,
"actual": 49.2,
"difference": 0,
"message": "quantity x unit price"
},
{
"kind": "line_total",
"path": "line_items[4].total",
"status": "pass",
"expected": 29.4,
"actual": 29.4,
"difference": 0,
"message": "quantity x unit price"
},
{
"kind": "line_total",
"path": "line_items[5].total",
"status": "pass",
"expected": 90,
"actual": 90,
"difference": 0,
"message": "quantity x unit price"
}
]
},
"outputs": [
{
"name": "output.json",
"bytes": 12857
},
{
"name": "output.xlsx",
"bytes": 10448
},
{
"name": "output.csv",
"bytes": 747
},
{
"name": "quickbooks.csv",
"bytes": 678
},
{
"name": "xero.csv",
"bytes": 1450
}
],
"warnings": []
}Real response from . Trimmed to 3 of 6 line items and 6 of 11 checks, with bounding boxes, empty fields and file links left out.
Try it on this fileWhat Extract From PDF returned, and the HTTP Request route
n8n 2.46.6, Extract from File 1.1.
| Input | What came back | Node status |
|---|---|---|
| Scanned invoice, HTTP Request to parserkit | 6 line items, verified, $0.02 | Success |
| Scanned invoice, default options | "text": "" | Success |
| Text PDF, default options | Plain lines, no fields | Success |
| Text PDF, Max Pages 0 | "text": "" | Success |
| Wrong Input Binary Field | The item has no binary field | Error |
Source: Reproduction log
Replace Extract From PDF with an HTTP Request
Take Extract From PDF out of the workflow and drop in an HTTP Request node that sends your binary file to POST /v1/parse?wait=60 (full parameters are in the API reference). Pages with a text layer are read from it and pages without one go through OCR, and the job counts them in digital_pages and ocr_pages.
When we sent invoice-hollins-scan.pdf, parserkit read it by OCR and returned 6 line items with status verified. The node below has the settings we ran.
{
"parameters": {
"method": "POST",
"url": "https://api.parserkit.com/v1/parse?wait=60",
"authentication": "genericCredentialType",
"genericAuthType": "httpHeaderAuth",
"sendBody": true,
"contentType": "multipart-form-data",
"bodyParameters": {
"parameters": [
{ "parameterType": "formBinaryData", "name": "file", "inputDataFieldName": "data" },
{ "name": "preset", "value": "invoice" }
]
},
"options": {
"response": { "response": { "fullResponse": true, "neverError": true } }
}
},
"name": "Parse with parserkit",
"type": "n8n-nodes-base.httpRequest",
"typeVersion": 4.2,
"credentials": {
"httpHeaderAuth": { "id": "REPLACE_WITH_YOUR_CREDENTIAL_ID", "name": "parserkit API key" }
}
}Set the timeout above 60 seconds
POST /v1/parse?wait=60 waits up to 60 seconds for the result and answers 202 with the job if it is still running. In the n8n HTTP Request node on 2.46.6, leaving the Timeout option off sets requestOptions.timeout = 300_000 ("set default timeout to 5 minutes"), but once you add the Timeout option ("Time in ms to wait for the server to send response headers (and start the response body) before aborting the request"), it defaults to 10000 milliseconds. Either leave Timeout off or set it to 70000 ms so it covers the 60-second wait with 10 seconds to spare.
A 1-page invoice like this costs $0.02. Parsing costs $0.02 a page and drops to $0.01 a page past 5,000 pages in a UTC month, while failed jobs and exact duplicates cost nothing. You get $1 in free credit (50 pages) on Google sign-in with no card required, and you can check the rest of the details on the pricing page.
FAQ
Common questions
Why does n8n Extract from File return empty text for a PDF?
n8n 2.46.6 extracts text with pdf.js getTextContent and only reads pages when maxPages !== 0. You get "text": "" either when the file is a scan with no text layer or when you add the Max Pages option and leave it at its default of 0. parserkit reads both cases, OCR included, and returns fields instead of text, at $0.02 a page.
Can Extract From PDF read a scanned PDF?
No, nothing in the n8n-nodes-base 2.46.6 Extract From PDF code path runs OCR. On our 1-page scanned invoice invoice-hollins-scan.pdf, the node succeeded and returned "numpages": 1 and "text": "". parserkit read that same scan by OCR and returned its line items, verified, for $0.02.
What does "The item has no binary field" mean?
NodeOperationError: The item has no binary field 'attachment_0' [item 0] means the name in Input Binary Field does not match the property holding your file. Extract From File defaults to 'data', while a node like Gmail Trigger with Download Attachments on saves the first attachment to 'attachment_0'. Point parserkit's HTTP Request node at that same field and the file goes straight to POST /v1/parse.
What does Max Pages 0 do in Extract From PDF?
Max Pages ("Maximum number of pages to include") defaults to 0 when you add it to the node. Because n8n-nodes-base 2.46.6 checks that maxPages !== 0 before reading pages, leaving it at 0 makes the node skip every page and return "text": "". parserkit has no page option to trip on: it reads every page, up to 250 a job.
What does parserkit cost per PDF?
Failed jobs and exact duplicates cost nothing, and past 5,000 pages in a UTC month the rate drops to $0.01 a page. parserkit charges $0.02 for a 1-page invoice and gives you $1 in free credit on Google sign-in, 50 pages with no card.
Related
- extract_text returns emptypdfplumber and pypdf return '' on scanned PDFs. Spot a scan in one line, then let parserkit read it with OCR and checked totals.
- Email Parser by Zapier: no action availableWhy Email Parser by Zapier shows "No action available", why its templates miss fields, and how parserkit posts checked JSON to your Zap.
- n8nAn importable n8n workflow: a form or email in, HTTP Request to parserkit, poll on 202, retry on 429, checked JSON out.
- Invoice parser APILine items, taxes and totals as JSON, with every sum re-added.
- PDF to JSON APIYour own JSON Schema in, those fields out, with sums re-added.
- PDF to JSON converterTurn the tables in a PDF into JSON rows with typed columns and the page of every row, free without an account.
Start free
Send us your worst scan
Your first $1 is free: 50 pages with every check and export, no card.
