Footers
Footers are editable running stories pinned to the bottom of every physical page in a DocumentSection. They share the exact same canonical story model as headers and automatically recompute live fields (Page 1 of 12) whenever pagination changes.
- Included in: All configurations in
DocumentEditorLayoutMode.paginated - Model:
PageHeaderFooteronSectionFormat(footer,firstPageFooter,evenPageFooter) - Pure-Dart import:
package:vyuh_document/types.dart
Quick example
dart
// Focus the footer of section 0 and insert "Page X of Y"
controller.focusPageRegion(
sectionIndex: 0,
region: PageRegionKind.footer,
);
controller.insertText('Page ');
controller.insertStandardInlineField(StandardInlineFields.pageNumber);
controller.insertText(' of ');
controller.insertStandardInlineField(StandardInlineFields.pageCount);What you can configure
Footer variants on SectionFormat
| Property | Type | Purpose |
|---|---|---|
footer | PageHeaderFooter? | Default (odd / all-page) running footer for the section |
firstPageFooter | PageHeaderFooter? | Distinct footer for page 1 when differentFirstPage: true |
evenPageFooter | PageHeaderFooter? | Alternating footer for even-numbered pages (e.g. mirrored page numbers) |
differentFirstPage | bool | Enables firstPageFooter independently from subsequent pages |
margins.footer | double (points) | Distance from the bottom physical page edge to the footer baseline |
pageNumbering | Section page numbering | Choose numbering format (Arabic, Roman, alphabetic) and optional restart number for the section |
PageHeaderFooter properties
| Property | Type | Purpose |
|---|---|---|
blocks | List<DocumentBlock> | Any supported block content (right-aligned paragraphs, multi-column tables, disclaimers, inline fields) |
height | double? | Optional minimum height for the footer region |
bodyPolicy | PageRegionBodyPolicy | Defines how tall footers interact with the bottom body boundary |
Interactive & programmatic editing
- Double-click bottom margin: Activates live inline footer editing on any page; changes propagate to all pages sharing that section's footer variant.
- Focus programmatically:
controller.focusPageRegion(sectionIndex: 0, region: PageRegionKind.footer). - Per-section footers: Insert a section break and assign a distinct
SectionFormat.footer(for example Roman numerals in front matter and Arabic page numbers in chapters).
Restricting usage
- Pageless documents: Use
DocumentEditorLayoutMode.pagelesswhen footers should not exist. - Fixed legal/compliance footers: Protect the footer region or disallow footer focus commands via
DocumentPolicy.
Format parity
| DOCX | HTML | Markdown | |
|---|---|---|---|
Native word/footer*.xml (default, first, even) with PAGE & NUMPAGES fields | Painted per page with exact resolved page numbers | Emitted as semantic footer metadata | Body-focused export |