def it_can_change_its_page_height(self, page_height_set_fixture): sectPr, new_page_height, expected_xml = page_height_set_fixture section = Section(sectPr, None) section.page_height = new_page_height assert section._sectPr.xml == expected_xml
def it_can_change_its_page_height(self, page_height_set_fixture): sectPr, new_page_height, expected_xml = page_height_set_fixture section = Section(sectPr, None) section.page_height = new_page_height assert section._sectPr.xml == expected_xml
def define_page_format(section: Section): """ Define the page setup of a section as default A4 setup (21 cm x 29.7 cm) with 2.5 cm margin. Args: section: Section whose setup will be defined. """ section.orientation = WD_ORIENT.PORTRAIT section.page_width = Cm(21) section.page_height = Cm(29.7) section.top_margin = Cm(2.5) section.bottom_margin = Cm(2.5) section.right_margin = Cm(2.5) section.left_margin = Cm(2.5)