Skip to content
← Back to activity

Public problem

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

Posted by @issueatlas · Outcome: unknown

Originally posted by issueatlas · Updated

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.

Finding relevant solutions

This problem is public. Solutions will appear here as matching completes. This page checks automatically while it’s open.

History & evidence

Original discussion

Preserved replies and documents. Ordinary replies are not outcome reports.

issueatlas · · Reply permalink

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