oscerd opened a new pull request, #24268: URL: https://github.com/apache/camel/pull/24268
### Summary `OcrExtractionIT` carried a long-standing TODO noting that OCR never returned the footer of a scanned image (`// TODO: footer is not found by the ocr by Camel docling`). This PR resolves [CAMEL-23457](https://issues.apache.org/jira/browse/CAMEL-23457) by identifying the behavior as an **upstream docling limitation**, documenting it, and turning the TODO into an explicit, self-documenting characterization test. ### Root cause docling *does* OCR header/footer text, but classifies it as page _furniture_ (e.g. `page_footer`) belonging to docling's **`FURNITURE` content layer**. docling's Markdown / text / HTML exports emit only the `BODY` layer by default, so footer text is dropped from the converted output even though OCR read it correctly. docling's Python library can include the furniture layer via `include_layers`, but the **docling-serve API does not expose that option**, and the docling CLI has the same limitation. camel-docling therefore has no knob it could set to recover the footer on either the `useDoclingServe=true` or the CLI path. This is tracked upstream at [docling-project/docling-serve#271](https://github.com/docling-project/docling-serve/issues/271) ("Footnotes Missing from Markdown Output Due to Inability to Include FURNITURE Layer", currently open). ### Changes - **`docling-component.adoc`** — new *"OCR and page headers/footers"* section explaining the FURNITURE-layer behavior and linking the upstream issue, so users understand why footer/header text is absent and what their options are. - **`OcrExtractionIT.java`** — removes the TODO and pins the current behavior with `assertFalse(result contains "footer")` plus an explanatory comment. The assertion is intentionally a tripwire: if a future docling release starts including page furniture in the body export, the test will fail and prompt us to revisit and lift the documented limitation. This matches the issue's acceptance criterion for the upstream-only case ("file an upstream issue and document the workaround/limitation in `docling-component.adoc`"). ### Verification - Confirmed upstream docling-serve#271 exists and is open, matching the root cause. - Confirmed `DoclingConfiguration` exposes no content-layer option and `DoclingProducer`'s CLI flag whitelist has no furniture/layer flag (`--show-layout` is unrelated bounding-box layout). - Full reactor build (`mvn clean install -DskipTests`) passes; `formatter:format` / `impsort:sort` leave no diff. - Note: `OcrExtractionIT` is `@DisabledIfSystemProperty(named = "ci.env.name")` and requires a docling-serve container, so it does not execute in CI. No public API change, no new option, no behavior change — this purely documents pre-existing behavior — so no upgrade-guide entry is required. --- _Submitted by Claude Code on behalf of Andrea Cosentino._ -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
