| java.lang.Object | ||||
| ↳ | com.pdftron.layout.ContentElement | |||
| ↳ | com.pdftron.layout.ContentNode | |||
| ↳ | com.pdftron.layout.ContentContainer | |||
| ↳ | com.pdftron.layout.Section | |||
A Section is a part of a document with its own page setup and its own headers and footers.
A document always has at least one section. Adding a section starts the content on a new page.
A section is a content container: paragraphs, tables and lists can be added to it directly.
| Nested Classes | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
| enum | Section.PageGroup | The group of pages a header or a footer applies to. | |||||||||
| Public Methods | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
| double | getBottomMargin() | ||||||||||
| ContentContainer |
getFooter(Section.PageGroup pages)
Gets the footer of the section for the given group of pages.
| ||||||||||
| ContentContainer |
getHeader(Section.PageGroup pages)
Gets the header of the section for the given group of pages.
| ||||||||||
| double | getLeftMargin() | ||||||||||
| ContentContainer |
getOrCreateFooter(Section.PageGroup pages)
Gets the footer of the section for the given group of pages, creating it
if the section does not have one yet.
| ||||||||||
| ContentContainer |
getOrCreateHeader(Section.PageGroup pages)
Gets the header of the section for the given group of pages, creating it
if the section does not have one yet.
| ||||||||||
| double | getPageHeight() | ||||||||||
| double | getPageWidth() | ||||||||||
| double | getRightMargin() | ||||||||||
| double | getTopMargin() | ||||||||||
| void |
removeFooter(Section.PageGroup pages)
Removes the footer of the section for the given group of pages.
| ||||||||||
| void |
removeHeader(Section.PageGroup pages)
Removes the header of the section for the given group of pages.
| ||||||||||
| void |
setMargins(double leftPoints, double topPoints, double rightPoints, double bottomPoints)
Sets the margins of the section, overriding the document defaults.
| ||||||||||
| void |
setPageSize(double widthPoints, double heightPoints)
Sets the page size of the section, overriding the document default.
| ||||||||||
|
[Expand]
Inherited Methods | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
From class
com.pdftron.layout.ContentContainer
| |||||||||||
From class
com.pdftron.layout.ContentNode
| |||||||||||
From class
com.pdftron.layout.ContentElement
| |||||||||||
From class
java.lang.Object
| |||||||||||
Gets the footer of the section for the given group of pages.
| pages | The group of pages the footer applies to |
|---|
null if the section has no such footer| PDFNetException |
|---|
Gets the header of the section for the given group of pages.
| pages | The group of pages the header applies to |
|---|
null if the section has no such header| PDFNetException |
|---|
Gets the footer of the section for the given group of pages, creating it if the section does not have one yet.
| pages | The group of pages the footer applies to |
|---|
| PDFNetException |
|---|
Gets the header of the section for the given group of pages, creating it if the section does not have one yet.
| pages | The group of pages the header applies to |
|---|
| PDFNetException |
|---|
Removes the footer of the section for the given group of pages.
| pages | The group of pages the footer applies to |
|---|
| PDFNetException |
|---|
Removes the header of the section for the given group of pages.
| pages | The group of pages the header applies to |
|---|
| PDFNetException |
|---|
Sets the margins of the section, overriding the document defaults.
| leftPoints | The left margin in points |
|---|---|
| topPoints | The top margin in points |
| rightPoints | The right margin in points |
| bottomPoints | The bottom margin in points |
| PDFNetException |
|---|
Sets the page size of the section, overriding the document default.
| widthPoints | The width in points |
|---|---|
| heightPoints | The height in points |
| PDFNetException |
|---|