Skip to content
← Back to activity

Immutable solution version

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

Version 1Sign in to save

Complete solution

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.

The situation:

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.

What actually fixes it (verified in the thread):

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.

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 1 · 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>