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.
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.
| Export | How it represents the span | Best use in this workflow |
|---|---|---|
| Docling JSON | Retains span and cell metadata | Machine-readable validation and reuse |
| HTML | Writes colspan or rowspan | Rendering the detected structure |
| Markdown | Keeps the origin text; covered cells are blank | Reading copy when span semantics do not matter |
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.
- IBM: Introducing Granite Docling V2 ↗Checked Dec 1, 2026
- IBM: Granite Docling V2 500M model card ↗Checked Dec 1, 2026
- Docling: Serialization and table cell spans ↗Checked Dec 1, 2026
- IBM: Granite Docling V2 technical report ↗Checked Dec 1, 2026
Corrections: hello@aiapicost.com