Dosu LogoDosu Logo
Ask
Join our Discord
DoclingPublic
IBM Docling
DocumentsDocling
How can I find page numbers and bounding box information for content in a chunk produced by the hybrid chunker, and what is the structure of the doc_items list within a chunk?
How can I find page numbers and bounding box information for content in a chunk produced by the hybrid chunker, and what is the structure of the doc_items list within a chunk?
Type
Answer
Status
Published
Created
Mar 2, 2026
Updated
Mar 29, 2026
Created by
Dosu Bot
Updated by
Dosu Bot

Page numbers and bounding box information for content in a chunk produced by the hybrid chunker are available through the chunk's provenance metadata. Specifically, each chunk has a meta.doc_items list, where each doc_item represents a discrete document element (such as a paragraph, list item, table, image, etc.). Each doc_item contains a prov list with provenance information, including:

  • page_no: the page number (integer)
  • bbox: the bounding box (with absolute coordinates: l, t, r, b)
  • charspan: the character span (start, end)

Note: Bounding box coordinates are absolute (pixels/points), not normalized. To normalize them to a 0–1.0 range, use the normalized() method on the bounding box and provide the page's size.

Example to extract page numbers:

for item in chunk.meta.doc_items:
    for prov in getattr(item, "prov", []):
        print(prov.page_no)

Why multiple doc_items per chunk? The hybrid chunker combines consecutive document elements (doc_items) into a chunk until a token limit is reached. For example, if three paragraphs fit within the token limit, all three will be included in the chunk's doc_items list. This allows you to trace which original document elements contributed to each chunk.

Table-aware chunking: When a table is too large to fit in a single chunk, the HybridChunker can automatically split it across multiple chunks while preserving context:

  • The repeat_table_header parameter (default: True) controls whether table headers are automatically repeated when tables are split. When enabled, each chunk containing table rows includes the header, making chunks self-contained and independently understandable. This is especially valuable when chunks are processed separately or stored in different locations
  • The omit_header_on_overflow parameter (default: False) controls behavior specifically when the table header itself exceeds max_tokens. When set to True, oversized headers are omitted from subsequent chunks; when False, headers are included even if they cause chunks to exceed max_tokens. This parameter is particularly useful for tables with very wide headers that might violate token limits
  • These behaviors can be adjusted by setting repeat_table_header=False or omit_header_on_overflow=True when initializing the chunker
  • Table header repetition is supported for both markdown and HTML-serialized tables

Example of HybridChunker with table header repetition:

from docling_core.transforms.chunker import HybridChunker

# Default behavior: table headers are repeated
chunker = HybridChunker(max_tokens=512)

# Disable header repetition if needed
chunker = HybridChunker(max_tokens=512, repeat_table_header=False)

# Handle wide tables with large headers using omit_header_on_overflow
chunker = HybridChunker(
    max_tokens=512,
    repeat_table_header=True,
    omit_header_on_overflow=True # Omit headers when they would cause overflow
)

Limitations:

  • Line numbers are not available.
  • DOCX files do not provide page or bounding box metadata; convert to PDF if you need this data.
  • Table items may have empty provenance lists, so page info may not be available for tables even in PDFs.

References:

  • ProvenanceItem definition
  • DocItemLabel enum
  • HybridChunker algorithm
Documents
Building a Modular IDP Pipeline with Docling Components
Can I use a custom OCR model in Docling, and how do I set its path in the pipeline options?
Can docling-serve fetch documents from object storage (e.g., S3)?
Comment corriger la phrase : "Je suis allé à l'école en pied et mains je parte par quotidien des beaucoup de kilomètres cela est importante" ?
Content Layers
Docling MCP in Docling Serve
Does Docling automatically detect the language of a document when sending images to Tesseract OCR, and how can it be configured?
How can I enable and use GPU acceleration with Docling?
How can I find page numbers and bounding box information for content in a chunk produced by the hybrid chunker, and what is the structure of the doc_items list within a chunk?
How can I improve the resolution or quality of images extracted from a PDF using docling?
How can I set up and run docling-serve on a MacBook Pro using Docker, and what performance and stability considerations should I be aware of?
How can I use Docling's REST API to convert a PDF from a URL to Markdown with OpenAI-generated image descriptions, and is base64 encoding required for URL sources?
How can I use granite-docling to process all PDFs in a directory and output doctags?
How can a student build a local, open-source LLM-based system to extract and analyze technical PDF documents (PMS/IDC) and generate instrumentation datasheets, using Python on a PC with limited resources?
How can a student build a local, open-source, privacy-preserving AI system to extract and query technical PDF documents (PMS/IDC) on a PC with limited resources?
How can you make Docling read/understand images embedded in a DOCX file, and what is the correct code to use the VlmPipeline for this purpose?
How can you mount a PersistentVolumeClaim (PVC) in docling-serve on OpenShift to store EasyOCR models, and what steps are required to ensure docling-serve can access these models?
How can you use Docling's REST API to convert a PDF to Markdown and generate image descriptions using an OpenAI model?
How do I set up a complete multi-format document processing pipeline using Docling that handles technical PDFs, HTML files, images, videos, audio, codebases, and schematics, and exports everything to organized agent-friendly markdown files?
How do you install and use Docling in Python on WSL2, including integration with an AI agent?
How do you use HybridChunker in Docling, including saving and reloading the converted document?
How does Docling reconstruct reading order without using a large language model (LLM) call in an unsupervised manner?
How does Docling support parallel/multiprocessing for document conversion, and what do the key performance parameters (`page_chunk_size`, `doc_batch_concurrency`, `doc_batch_size`) do?
How to properly enable `enable_remote_services` in Docling Serve (CPU image) to use an external OpenAI-compatible API for picture description and formula enrichment, and what is the correct config format?
Models handling in Docling Serve
No Docling, o uso de CUDA é obrigatório para processar PDFs com extração de texto e descrição de imagens, ou é opcional?
Quais são as melhores opções de OCR para extração de tabelas financeiras complexas em PDFs usando Docling, incluindo alternativas externas e integração com plugins?
Quelle est l'origine et le statut des êtres mathématiques selon Platon et John Stuart Mill ?
What are all the parameters of HybridChunker in Docling, and how do you use it with a custom tokenizer?
What are all the pipelines that exist in Docling, including their purposes, selection criteria, and how they handle scanned documents?
What are the detailed pipeline options and processing behaviors for PDF, DOCX, PPTX, and XLSX files in the Python SDK?
What are the differences between `vlm_pipeline_model_local` and `picture_description_local` in Docling, and how do image descriptions, OCR, and table extraction work together? Also, how do the `include_annotations` and `mark_annotations` properties affect exported output?
What are the steps to convert a complex payment advice PDF to Excel using Docling?
What does 'RFLP' stand for or refer to?
What is the best practice for extracting text from a mixed PDF (digital + scanned pages) for enterprise financial document processing without a GPU and with limited costs?
What is the best practice for processing a mixed PDF (digital + scanned pages) containing sensitive financial data in Docling, given no GPU and limited cost?
What is the general sentiment expressed about the messy nature of documents and content in the Docling project?
What is the recommended Azure deployment option for a Docling-based Python SDK application using a custom Dockerfile with PyTorch and OCR, and why?
What is the recommended architecture and implementation for processing a mixed PDF bundle (digital + scanned pages) for an enterprise financial payment verification system (like MRT Jakarta's AI-Augmented Payment Flow), with constraints of no GPU and limited cost?
When processing large PDFs (700+ pages) with Docling's StandardPdfPipeline, what causes the `std::bad_alloc` errors and what are the recommended workarounds?
Which is the better option for running Docling: using 'docling serve' in Azure Container Apps or code-based deployment in Azure Function App (Windows Premium plan)?
Why are bounding boxes not available for items (such as images, tables, text) when using VlmPipeline with certain VLM presets (like Qwen/Markdown)?
Zoom on Layer 1 (L1): Layout Detection & Routing in a Modular IDP Pipeline
skill.md
คู่มือการดึงรูปภาพจาก PDF และสร้าง Markdown พร้อม Alternative Text ด้วย Docling