distance_bottom property

Table.distance_bottom property

Gets or sets distance between table bottom and the surrounding text, in points.

@property
def distance_bottom(self) -> float:
    ...

@distance_bottom.setter
def distance_bottom(self, value: float):
    ...

Examples

Shows how to set distance between table boundaries and text.

doc = aw.Document(MY_DIR + "Table wrapped by text.docx")

table = doc.first_section.body.tables[0]

self.assertEqual(25.9, table.distance_top)
self.assertEqual(25.9, table.distance_bottom)
self.assertEqual(17.3, table.distance_left)
self.assertEqual(17.3, table.distance_right)

# Set distance between table and surrounding text.
table.distance_left = 24
table.distance_right = 24
table.distance_top = 3
table.distance_bottom = 3

doc.save(ARTIFACTS_DIR + "Table.DistanceBetweenTableAndText.docx")

See Also