Generic function to add footer rows. Dispatches to class-specific methods, allowing footers to be added to both spec objects and global options.
Arguments
- spec
Spec object (dispatches on class)
- ...
Up to 3 character strings (left, center, right)
Positional parts represent left, center and right header/footer cells respectively.
Supply fewer than 3 parts if some cells should be empty; use empty string "" for explicit empties.
Each call appends one header/footer row; use the
levelparameter to replace an existing row.
- level
Optional numeric index. If provided, replaces footer at that row. If NULL, appends next row.
Details
Each call adds a new footer row. Per schema, footers are arrays of arrays (each call = one row).
Examples
# Add to a spec object; {PAGE}/{NUMPAGES} become real Word fields on render
spec <- create_text() |>
add_footer("Company Name", "", "Page {PAGE} of {NUMPAGES}") |>
add_footer("", "Confidential", "")