Developer workflow · Practical guide

Granite Docling V2: check merged headers before exporting to Markdown

IBM’s new document models emit structured DocLang. A merged header can survive conversion and still disappear as a relationship in the Markdown export.

Hypothetical table showing Usage spanning Input and Output in a structured view, but occupying just the first cell in the default Markdown export.
Hypothetical merged-column header, drawn from the documented Docling serializer behavior checked December 1, 2026. It is not output from an IBM model run. AI API Cost · original export diagram · Source ↗

A model upgrade does not fix a lossy export

IBM released Granite Docling V2 500M and 2B on November 30. Both take a page image and emit DocLang, a structured representation with element types, positions and reading order. If your application turns a PDF price sheet into a searchable table, the practical question is whether the output it actually reads still says which columns a header applies to.

Suppose a source page has a Usage header spanning Input and Output, as in the hypothetical cover. Converting the page correctly means preserving not just the word Usage but its relationship to both columns. A downstream importer that treats the two columns separately cannot rely on text matching to establish that relationship.

Keep a structural copy and derive the reading view

IBM’s model card shows how to turn the generated DocLang into a DoclingDocument. In its Transformers example, decoding keeps special tokens because they include DocLang tags and locations. If an integration strips those tokens before parsing, investigate decoding before blaming the model for missing layout.

After parsing, inspect the document object or JSON and verify the header’s column span. Docling’s default HTML export can express the span, and its JSON preserves span metadata. Default Markdown export has no cell-span syntax. It writes the header at the starting cell and leaves the covered cells empty. The word can still be there even when the relationship is not.

If a billing-table importer consumes this output, keep the structured copy and give the importer an explicit column-to-header mapping. Treat Markdown as a reading copy, or create a deliberate flattened format that repeats parent headings in each applicable column. Do not infer a missing value just because the Markdown cell next to a merged header is blank.

What happens to one merged header?

Scroll sideways to read all columns.

ExportHow it represents the spanBest use in this workflow
Docling JSONRetains span and cell metadataMachine-readable validation and reuse
HTMLWrites colspan or rowspanRendering the detected structure
MarkdownKeeps the origin text; covered cells are blankReading copy when span semantics do not matter
Default Docling export behavior as documented on December 1, 2026. This compares representation of a correctly detected span, not extraction accuracy.Source 1 ↗

Test the page shape and the delivered format separately

Pick a few pages with the structures that matter to your task: a grouped header, a multirow label, and a plain unmerged table as a control. Write down expected groups, reading order and several values tied to their row and column labels. Compare those expectations with parsed JSON first, then with the records produced by the final importer. A mismatch in JSON points upstream of export; a mismatch only in the final records points to export or interpretation.

IBM’s technical report reassesses benchmark pages against revised ground truth and warns that those scores cannot be compared directly with scores from the original benchmarks. Use the report to understand what was measured, not as evidence that your price-sheet importer passes. Before making a model choice, tally how many pages pass both checks and how much manual correction remains. If the structure was already right in JSON, fix the handoff before paying for another conversion pass.

Sources & verification

Provider documentation supports the facts referenced below. Our explanations and recommendations are editorial interpretation.

  1. IBM: Introducing Granite Docling V2 ↗Checked Dec 1, 2026
  2. IBM: Granite Docling V2 500M model card ↗Checked Dec 1, 2026
  3. Docling: Serialization and table cell spans ↗Checked Dec 1, 2026
  4. IBM: Granite Docling V2 technical report ↗Checked Dec 1, 2026

Corrections: hello@aiapicost.com

Keep reading