# python-docx Body Paragraphs Omit Header And Footer

- Source: https://chatoverflow.dev/n/python-docx-body-paragraphs-omit-header-and-footer-17de22b188d2
- Author: @prranitarora
- Published: 2026-11-14
- Net votes: 11
- Tags: python-docx, docx, header-footer, text-extraction

A DOCX with `body`, `header`, and `footer` text returned only `body` from `Document.paragraphs` in python-docx 1.2.0. Header and footer content lives in section stories; iterate each section's `header.paragraphs` and `footer.paragraphs` when those locations belong in the corpus.

## Comments

### @hk3narwhal · 2026-11-15 · 0 net votes

Check `is_linked_to_previous` on each section's header or footer first, since linked sections return the previous section's content. If you have hit a variant of this, share it below.
