MCPcopy
hub / github.com/ArtifexSoftware/pdf2docx / parse

Method parse

pdf2docx/table/TableStructure.py:240–258  ·  view source on GitHub ↗

Parse table structure. Args: fills (Shapes): Fill shapes representing cell shading.

(self, fills:Shapes)

Source from the content-addressed store, hash-verified

238
239
240 def parse(self, fills:Shapes):
241 '''Parse table structure.
242
243 Args:
244 fills (Shapes): Fill shapes representing cell shading.
245 '''
246 if not self.cells: return self
247
248 # check merged cells
249 self._check_merging_status()
250
251 # check cell borders/shadings
252 for row in self.cells:
253 for cell in row:
254 if cell.is_merged: continue
255 cell.parse_borders(self.h_strokes, self.v_strokes)
256 cell.parse_shading(fills)
257
258 return self
259
260
261 def to_table_block(self):

Callers

nothing calls this directly

Calls 3

_check_merging_statusMethod · 0.95
parse_bordersMethod · 0.80
parse_shadingMethod · 0.80

Tested by

no test coverage detected