AI Demos Research — the structured-intelligence platform. Every verdict on these pages opens to the execution behind it.
Graded 17 October 2026

Does Nutrient.io preserve code blocks when converting PDFs to Markdown?

Nutrient.io did not preserve the code block in its default PDF-to-Markdown conversion. It returned the Python snippet as a table without a code fence or its original indentation.

1 of 1 test case failed

Every test case in this scenario has a result.

Pass rate0%0 of 1 gradable
Coverage1 of 1test case with a result
0PassNo test case passed.
1FailMissed at least one thing it was expected to do; the reason and proof are with each test case below.
0Not gradableEvery result here could be graded.
0UntestedEvery test case in this scenario has a result.
The pass rate is a summary. The evidence is the test case below: what we sent, what we checked, what the tool returned, and the proof.

The test case

Each test case is judged on its own: Pass, Fail, Not gradable, or Untested. The scenario result above is based on this test case.

Code block — fenced, structure intactFailEvidence
What we sent
InputDocument (PDF)
Input PDF: operations note with a Python snippet and shell command on page 2
Open the PDF ↗
What the tool returned
Markdown
<table>
 <tr>
  <th>from tarnbeck.stations import Export, reload_window</th>
 </tr>
 <tr>
  <th>def reload_after_reset(station, reset_at):</th>
 </tr>
 <tr>
  <th>export = Export.open(station)</th>
 </tr>
 <tr>
  <th>window = reload_window(reset_at, margin_minutes=45)</th>
 </tr>
 <tr>
  <th>for block in export.blocks(window):</th>
 </tr>
 <tr>

Returned Markdown: Python snippet rendered as a table without code fences

Copied from Output file (Markdown), lines 67–83

Open the Markdown file ↗
JSON
{
  "status_code": 200,
  "headers": {
    "date": "Wed, 09 Sep 2026 08:53:19 GMT",
    "content-type": "text/markdown",
    "content-length": "6340",
    "content-disposition": "attachment; filename=\"result.md\"",
    "server": "Cowboy",
    "x-pspdfkit-remaining-credits": "38",
    "x-pspdfkit-request-cost": "1",
    "x-request-id": "GNObFoUaysppv0UAAIMB"
  },
  "content_type": "text/markdown",
  "body_bytes": 6340,
  "delivery": "raw markdown body (content-type text/markdown)",
  "markdown_chars": 6332,
  "zip_members": null,
  "asset_names": null
}

API exchange: default conversion request and Markdown response

Copied from Captured file (JSON), response

Open the whole JSON file ↗
Expected vs. Found
✗Expected: Code appears as a preformatted or fenced block, with line breaks and indentation intact.Found: The Markdown contained no code fences. The Python snippet appeared as a table with one source line per row and its indentation flattened.
Why this result

The code needed to remain preformatted with its line structure and indentation intact. The complete PDF was converted successfully using the default path, but the returned snippet lost its block formatting and indentation, so the failure was in the output rather than the conversion setup.

Also observed in this test case

Alternative conversion. A separate Data Extraction API conversion using understand mode fenced the Python snippet, but ran its lines together on one line.

Code text preserved. The returned code preserved the characters of each source line, even though its block structure was lost.

Tested by Chandresh Bisht · evidence dated 9 September 2026

Configuration and setup

How this tool was set up for the run and what the test needed in place. Each row is a fact from the run's records; a fact the records do not hold is left out, not guessed.

Software that produced the output
Nutrient.io
Build or version
Not exposed by the hosted product
Plan or tier
free tier
Surface
API
Set up before the run
A PDF containing a code block had to be converted to Markdown using the product’s default conversion path, with the complete PDF sent in one pass.
Pipeline
Markdown output · No actions set (the product's defaults); no OCR or other action ran; one pass; complete PDF
Tested
9 September 2026 · Chandresh Bisht

How this scenario is graded

How we decide Pass, Fail and Not gradable. The same rules apply to every tool tested on this scenario.

How results are decided

Each test case gets one result per tool: Pass, Fail or Not gradable. A test case we haven't run yet shows Untested. There are no partial results.

The rules
  • Pass: the tool did everything the test expected, and nothing it said contradicts the correct answer.
  • Fail: at least one expected behaviour clearly didn't happen; the test case's result says which one and quotes the tool.
  • Not gradable: our evidence couldn't settle the outcome (for example a record we needed is missing). It is never counted as a fail, and the test case's result says what's missing.

Where this sits in the benchmark

This page is one cell of a larger study: one tool, one scenario. Only this benchmark's frame appears here.

History of this result

What has happened to this result since it was first published. Runs and grades are never overwritten: a retest or a re-grade publishes a new result and keeps the earlier one readable.

from the publication record
11 November 2026First publishedConverting a complex PDF into clean Markdown with a hosted API v1

Act on this result

Nothing filed here edits the run or the grade. A challenge opens a review, and a review can produce a new run or a re-grade — which becomes the current result and leaves this one in the history.

This matches what I see

You run the same kind of test against your own setup and get the same behaviour.

Agree →
This does not match

Yours behaves differently. Tell us what you got, with a screenshot if you have one.

Disagree →
Point out an issue

Something here is wrong — a reference value, a transcription, a grade.

Report an issue →
Request a retest

On a newer build, a larger dataset, or your own setup.

Request a retest →
We have fixed this

Tell us what changed and we schedule a rerun of the failing test case. The old result stays as history.

Vendor notice →
Filed against this evidenceNothing yet. Challenges, counter-evidence and fix notices appear here with their outcome, and stay on the page after they are resolved.
Cite this result
aidemos.com/benchmarks/pdf-to-markdown-apis/results/nutrient-io/a-document-containing-a-code-block · 0 pass · 1 fail · coverage 1/1 · graded 2026-10-17

The same record is available as structured data through the AI Demos MCP server, with the counts, the coverage and every per-test-case reason carried as fields.

Verify the proof files

These files support this result. Open a file to inspect the original evidence.

Input · Document (PDF) ↗application/pdf · 78 KB
Output file (Markdown) ↗text/markdown · 6 KB
Captured file (JSON) ↗application/json · 1 KB
File fingerprints (SHA-256)

A fingerprint identifies the exact file used for this result.

Input · Document (PDF)cd27d1e77ec9818ff769bde1b49d95e711373888507af4b007054c27b7a52db8
Output file (Markdown)f795ca5a5b973c56f46a55daffb1a6847c5c52e20d134aabb7b95970ff5f98e1
Captured file (JSON)5cc7c91aca62325bc311e58b8f1d4ea310af6024e84fbfbce5fa63ef7c5b79b1