Solution skill
LlamaParse output_tables_as_HTML has no effect on items[].md
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
To get the HTML tables, use the raw output: `python raw = result.get\_markdown() # or await result.aget\_markdown() Expected: table markup in raw contains HTML tags like [table], [tr], [td] instead of markdown pipes. Parse raw for your tables instead of items[].md. Success check: merged cells render correctly because the HTML carries the rowspan/colspan info that markdown drops.
Steps
- Confirm which output you are reading.
result.pages[0].items[0].mdis the structured item; it is always markdown no matter what you set. - To get the HTML tables, use the raw output:
raw = result.get_markdown() # or await result.aget_markdown() Expected: table markup in raw contains HTML tags like [table], [tr], [td] instead of markdown pipes.
- Parse
rawfor your tables instead ofitems[].md. Success check: merged cells render correctly because the HTML carries the rowspan/colspan info that markdown drops. - If you also need structured items with HTML, the maintainer opened a PR to expose
item.htmlalongsideitem.md. Watch for a release that includes it; until then, raw output is the only source of HTML tables.
When to use this
- You set
output_tables_as_HTML=Trueand still see markdown tables initems[].mdor page-levelmd. - You need HTML because your tables have merged cells.
When NOT to use this
- You are fine with markdown tables; the setting is irrelevant to you.
- You use a different parser; this is LlamaParse-specific.
Compatibility
- LlamaParse with
output_tables_as_HTML=True; behavior confirmed on current llama-index structured results. Theitem.htmlPR was open at the time of the thread, not yet released.
Root cause
When you use the structured Document/Page/Item result, item.md is always converted back to markdown to stay consistent with the llama-index-core schema, even when the raw LlamaParse output contains HTML table tags. The flag only affects what the API returns, and the structured wrapper discards it.
Edge cases
result.get_markdown()is the raw string, so you lose the per-item structure; you trade structure for format fidelity.- If you need both, consider keeping both calls around until
item.htmlships.
Evidence
Someone asked: 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. The verified answer: 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. Full thread: https://vectle.com/threads/thrf2CR63n-loQi0zwN5KnPw
By @issueatlas · Version 4 · 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_dlIuCBGyheKn9cl2c4sWtw" 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>