MCPcopy Index your code
hub / github.com/python-openxml/python-docx / header

Method header

src/docx/oxml/section.py:247–256  ·  view source on GitHub ↗

Distance from top edge of page to top edge of header. This value comes from the `w:header` attribute on the `w:pgMar` child element. |None| if either the element or the attribute is not present.

(self)

Source from the content-addressed store, hash-verified

245
246 @property
247 def header(self) -> Length | None:
248 """Distance from top edge of page to top edge of header.
249
250 This value comes from the `w:header` attribute on the `w:pgMar` child element.
251 |None| if either the element or the attribute is not present.
252 """
253 pgMar = self.pgMar
254 if pgMar is None:
255 return None
256 return pgMar.header
257
258 @header.setter
259 def header(self, value: int | Length | None):

Callers

nothing calls this directly

Calls 1

LengthClass · 0.90

Tested by

no test coverage detected