MCPcopy Create free account
hub / github.com/pymupdf/PyMuPDF / __init__

Method __init__

src/table.py:2036–2050  ·  view source on GitHub ↗
(self, page, settings=None)

Source from the content-addressed store, hash-verified

2034 """
2035
2036 def __init__(self, page, settings=None):
2037 self.page = weakref.proxy(page)
2038 self.textpage = None
2039 self.settings = TableSettings.resolve(settings)
2040 self.edges = self.get_edges()
2041 self.intersections = edges_to_intersections(
2042 self.edges,
2043 self.settings.intersection_x_tolerance,
2044 self.settings.intersection_y_tolerance,
2045 )
2046 self.cells = intersections_to_cells(self.intersections)
2047 self.tables = [
2048 Table(self.page, cell_group)
2049 for cell_group in cells_to_tables(self.page, self.cells)
2050 ]
2051
2052 def get_edges(self) -> list:
2053 settings = self.settings

Callers

nothing calls this directly

Calls 6

get_edgesMethod · 0.95
edges_to_intersectionsFunction · 0.85
intersections_to_cellsFunction · 0.85
TableClass · 0.85
cells_to_tablesFunction · 0.85
resolveMethod · 0.80

Tested by

no test coverage detected