Add code to expose text direction of cell

Signed-off-by: Christoph Auer <cau@zurich.ibm.com>
This commit is contained in:
Christoph Auer
2025-02-05 12:48:12 +01:00
parent d7c9874a88
commit 7bdd6868ed
6 changed files with 51 additions and 10 deletions

View File

@@ -26,6 +26,17 @@ def _get_backend(pdf_doc):
return doc_backend
def test_cell_ordering():
pdf_doc = Path("tests/data/pdf/right_to_left_01.pdf")
doc_backend = _get_backend(pdf_doc)
for page_index in range(0, doc_backend.page_count()):
page_backend: DoclingParseV2PageBackend = doc_backend.load_page(page_index)
cells = list(page_backend.get_text_cells())
1 == 1
def test_text_cell_counts():
pdf_doc = Path("./tests/data/pdf/redp5110_sampled.pdf")