MCPcopy Create free account
hub / github.com/Paper2Poster/Paper2Poster / _process_page

Function _process_page

docling/utils/export.py:104–118  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

102 return cells
103
104 def _process_page():
105 page_ix = page_no - 1
106 page = doc_result.pages[page_ix]
107
108 page_cells = _process_page_cells(page=page)
109 page_segments = _process_page_segments(doc_items=doc_items, page=page)
110 content_md = doc.export_to_markdown(
111 main_text_start=start_ix, main_text_stop=end_ix
112 )
113 # No page-tagging since we only do 1 page at the time
114 content_dt = doc.export_to_document_tokens(
115 main_text_start=start_ix, main_text_stop=end_ix, add_page_index=False
116 )
117
118 return content_text, content_md, content_dt, page_cells, page_segments, page
119
120 if doc.main_text is None:
121 return

Callers 1

Calls 2

_process_page_cellsFunction · 0.70
_process_page_segmentsFunction · 0.70

Tested by

no test coverage detected