Skip to content
Back to top
View this page

# pdf2docx.layout.Section module

Section of Page.

In most cases, one section per page. But in case multi-columns page, sections are used to distinguish these different layouts.

Note

Currently, support at most two columns.

    {
        'bbox': (x0,y0,x1,y1)
        'num_cols': 1,
        'space': 0,
        'columns': [{
            ... # column properties
        }, ...]
    }

class pdf2docx.layout.Section.Section(space: int = 0, columns: list = None, parent=None)

  Bases: `BaseCollection`

  make_docx(doc)

    Create section in docx.

    Args:

      doc (Document): `python-docx` document object

  property num_cols
  parse(**settings)

    Parse section layout.

  restore(raw: dict)

    Restore section from source dict.

  store()

    Store parsed section layout in dict format.