# HeaderFooterCollection Object

> Contains all headers and footers in a document or part of the document.

- **Product:** DS Server
- **Section:** Reference
- **Kind:** Object
- **Introduced:** 28.0
- **Path:** DS Server > Reference > JavaScript API > HeaderFooterCollection Object
- **Web URL:** https://docs.textcontrol.com/ds-server/reference/javascript/headerfootercollection/
- **LLMs URL:** https://docs.textcontrol.com/ds-server/reference/javascript/headerfootercollection/llms.txt
- **LLMs-Full URL:** https://docs.textcontrol.com/ds-server/reference/javascript/headerfootercollection/llms-full.txt

---

## On This Page

- [Description](https://docs.textcontrol.com/ds-server/reference/javascript/headerfootercollection/#description)
- [Syntax](https://docs.textcontrol.com/ds-server/reference/javascript/headerfootercollection/#syntax)
- [Examples](https://docs.textcontrol.com/ds-server/reference/javascript/headerfootercollection/#examples)
- [Members](https://docs.textcontrol.com/ds-server/reference/javascript/headerfootercollection/#members)

---

## In This Section

- [Javascript: HeaderFooterCollection.add Method](https://docs.textcontrol.com/ds-server/reference/javascript/headerfootercollection/add-method/llms.txt): Adds a new header or footer to a document or to a certain section of the document. If a header or footer is added to the complete document the first section receives the header or footer and all other sections receive headers or footers which are connected to their previous section. To add more than one header or footer a combination of the HeaderFooterType enumeration values can be used.
- [Javascript: HeaderFooterCollection.getItem Method](https://docs.textcontrol.com/ds-server/reference/javascript/headerfootercollection/getitem-method/llms.txt): Gets a particular header or footer from the collection.
- [Javascript: HeaderFooterCollection.remove Method](https://docs.textcontrol.com/ds-server/reference/javascript/headerfootercollection/remove-method/llms.txt): Removes a header or footer from the document or from a certain section.

---

## Nearby

- **Previous:** [HeaderFooterCallback Function](https://docs.textcontrol.com/ds-server/reference/javascript/headerfootercallback/llms.txt)
- **Next:** [Javascript: HeaderFooterCollection.add Method](https://docs.textcontrol.com/ds-server/reference/javascript/headerfootercollection/add-method/llms.txt)
