Skip to content

[Bug] docling-fast full mode omits vector flowchart region in NIST SP 800-53A #628

Description

@codeAtNectworks

Summary

When parsing the attached NIST SP 800-53A Rev. 5 PDF using docling-fast in full hybrid mode, a vector flowchart is not represented as an image, figure, picture, chart, or diagram element.

The text labels inside the flowchart are extracted as one paragraph, but the flowchart's arrows, grouped stages, visual boundary, and complete bounding box are lost.

The figure is therefore absent from the structured document model even though the conversion finishes successfully.

Environment

  • opendataloader-pdf: 2.4.7
  • Hybrid backend: docling-fast
  • Hybrid mode: full
  • Python: 3.12.13
  • Java: OpenJDK 26
  • Docling: 2.96.1
  • docling-core: 2.78.0
  • PyTorch: 2.12.0
  • Transformers: 5.9.0
  • Platform: macOS 26.5.1, arm64
  • Backend device: CPU
  • OCR force mode: disabled
  • PDF structure tree: disabled
  • Table method: cluster

Input document

NIST SP 800-53A Rev. 5:

nist-sp-800-53a-assessment-procedures-part-01.pdf

The failure occurs on PDF page 30 of the attached file, printed page 19.

The affected figure is:

FIGURE 7. OVERVIEW OF PROCESS TO CONDUCT EFFECTIVE SECURITY AND PRIVACY CONTROL ASSESSMENTS

Reproduction

Install the hybrid package:

python -m venv .venv
source .venv/bin/activate
pip install "opendataloader-pdf[hybrid]==2.4.7"

Start the backend:

opendataloader-pdf-hybrid \
  --host 127.0.0.1 \
  --port 5002 \
  --device cpu

Parse the document:

import opendataloader_pdf

opendataloader_pdf.convert(
    input_path="nist-sp-800-53a-assessment-procedures-part-01.pdf",
    output_dir="output-nist-53a",
    format="json,markdown,html,pdf",
    hybrid="docling-fast",
    hybrid_url="http://127.0.0.1:5002",
    hybrid_mode="full",
    hybrid_timeout="300000",
    table_method="cluster",
    use_struct_tree=False,
    image_output="embedded",
)

The backend completes successfully without a conversion error.

Expected behavior

Figure 7 should be represented by one structured visual element, for example:

{
  "type": "image",
  "page number": 30,
  "bounding box": [approximately 90, 447, 522, 489]
}

The exact element type could be image, figure, picture, chart, or diagram, but the structured output should contain one region covering the complete four-stage flowchart.

The figure contains four connected arrow stages:

  1. Prepare for Security and Privacy Control Assessments
  2. Develop Security and Privacy Assessment Plans
  3. Conduct Security and Privacy Control Assessments
  4. Analyze Assessment Report Results

The arrows and grouping are semantically important because they communicate an ordered process.

Actual behavior

No visual element is returned for Figure 7.

There is no page-30 element with any of these types:

image
figure
picture
chart
diagram
illustration

Instead, all four stage labels are flattened into one paragraph:

Prepare for Security and Privacy Control Assessments Develop Security and Privacy Assessment Plans Conduct Security and Privacy Control Assessments Analyze Assessment Report Results

The paragraph has this bounding box:

[118.333, 447.667, 181.667, 488.667]

That bounding box covers only a narrow portion of the actual figure. It does not cover the complete arrow diagram, which spans most of the page width.

The figure caption is extracted separately:

{
  "type": "paragraph",
  "page number": 30,
  "bounding box": [125.64, 424.366, 486.355, 431.103],
  "content": "FIGURE 7. OVERVIEW OF PROCESS TO CONDUCT EFFECTIVE SECURITY AND PRIVACY CONTROL ASSESSMENTS"
}

The table below Figure 7 is correctly detected as a table, confirming that the page was processed and that this is specific to the vector figure.

Comparison with nearby figures

Other figures in the same document are detected correctly.

For example, Figures 1 through 5 on preceding pages produce image elements with bounding boxes. Figure 7 does not.

This suggests that certain vector diagrams or arrow-based flowcharts are being treated as loose text rather than a visual region.

Impact

The JSON loses the following information:

  • that the content is a figure
  • the complete figure bounding box
  • the four-stage grouping
  • the arrows connecting stages
  • the left-to-right process order

This affects:

  • document previews and overlays
  • accessibility tagging
  • figure extraction
  • source citations
  • RAG systems that depend on document structure
  • downstream interpretation of process diagrams

The extracted paragraph alone is not semantically equivalent to the source figure.

nist-sp-800-53a-assessment-procedures-part-01.pdf

annotated.pdf
json.json

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions