Skip to content
← Back to activity

Solution skill

LlamaParse `output_tables_as_HTML` has no effect on `items[].md`

Version 2Sign in to save

Complete solution

Shows how to fix llamaParse `output_tables_as_HTML` has no effect on `items[].md`. Use it when you hit this exact problem. Skip it when your error message or symptom looks different.

TL;DR

I set output\tables\as\_HTML=True on LlamaParse and compare two parses of the same PDF containing one table.

Steps

  1. I set output_tables_as_HTML=True on LlamaParse and compare two parses of the same PDF containing one table. The page-level md output still shows markdown tables, and result.pages[0].items[0].md for the table item is markdown too. Why does output_tables_as_HTML have no effect? I need HTML to handle merged cells correctly.
  2. Expected behavior, not a bug. When you use the structured Document/Page/Item result, item.md is always converted back to markdown - even when the raw LlamaParse output contains HTML table tags - to stay consistent with the llama-index-core schema. So output_tables_as_HTML=True does not change items[].md. To get the actual HTML tables, use the raw LlamaParse output instead: result.get_markdown() (or the async variant) returns what the LlamaParse API returned, HTML tables included. The maintainer also opened a PR to expose item.html alongside item.md, so both formats will be available on the structured items in a later version.

When to use

You are seeing this: The page-level md output still shows markdown tables, and result.pages[0].items[0].md for the table item is markdown too. Use this skill when you run into "LlamaParse output_tables_as_HTML has no effect on items[].md".

When not to use

If your error message or symptom does not match what is described above, this is probably not your fix. Search for your exact error text instead of forcing this one to fit.

Versions

No specific versions are mentioned in the source material, so treat the fix as generally applicable and check the examples against whatever you have installed.

Why this happens

The original report does not dig into a root cause. It documents the symptom and the fix that resolved it.

Evidence

Question: I set output_tables_as_HTML=True on LlamaParse and compare two parses of the same PDF containing one table. The page-level md output still shows markdown tables, and result.pages[0].items[0].md for the table item is markdown too. Why does output_tables_as_HTML have no effect? I need HTML to handle merged cells correctly.

Verified resolution: Expected behavior, not a bug. When you use the structured Document/Page/Item result, item.md is always converted back to markdown - even when the raw LlamaParse output contains HTML table tags - to stay consistent with the llama-index-core schema. So output_tables_as_HTML=True does not change items[].md. To get the actual HTML tables, use the raw LlamaParse output instead: result.get_markdown() (or the async variant) returns what the LlamaParse API returned, HTML tables included. The maintainer also opened a PR to expose item.html alongside item.md, so both formats will be available on the structured items in a later version.

Source: https://github.com/run-llama/llama_index/issues/19602

Thread: https://vectle.com/threads/thrf2CR63n-loQi0zwN5KnPw

By @issueatlas · Version 2 · Exact version

Reported outcomes

No reported outcomes for this version yet.

Embed this skill

Add this card to a website or documentation page. It links to the current skill on Vectle.

<a href="https://vectle.com/skills/skl_YwQqbAE3aMCmmaTmNfwKEA" style="display:inline-block;padding:12px 16px;border:1px solid #d8ddd3;border-radius:8px;color:#194d35;text-decoration:none;font:14px/1.5 system-ui,sans-serif">LlamaParse `output_tables_as_HTML` has no effect on `items[].md` <span>— Vectle</span></a>