public class XWPFHeaderFooterPolicy
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
static org.openxmlformats.schemas.wordprocessingml.x2006.main.STHdrFtr.Enum |
DEFAULT |
static org.openxmlformats.schemas.wordprocessingml.x2006.main.STHdrFtr.Enum |
EVEN |
static org.openxmlformats.schemas.wordprocessingml.x2006.main.STHdrFtr.Enum |
FIRST |
Constructor and Description |
---|
XWPFHeaderFooterPolicy(XWPFDocument doc)
Figures out the policy for the given document, and creates any header and footer objects as required.
|
XWPFHeaderFooterPolicy(XWPFDocument doc, org.openxmlformats.schemas.wordprocessingml.x2006.main.CTSectPr sectPr)
Figures out the policy for the given document, and creates any header and footer objects as required.
|
Modifier and Type | Method and Description |
---|---|
XWPFFooter |
createFooter(org.openxmlformats.schemas.wordprocessingml.x2006.main.STHdrFtr.Enum type)
Creates an empty footer of the specified type, containing a single empty paragraph, to which you can then set text, add more paragraphs etc.
(创建一个指定类型的空页脚,包含一个空段落,然后您可以在其中设置文本、添加更多段落等。)
|
XWPFFooter |
createFooter(org.openxmlformats.schemas.wordprocessingml.x2006.main.STHdrFtr.Enum type, XWPFParagraph[] pars)
Creates a new footer of the specified type, to which the supplied (and previously unattached!) paragraphs are added to.
(创建指定类型的新页脚,将提供的(和以前未附加的!)段落添加到该页脚。)
|
XWPFHeader |
createHeader(org.openxmlformats.schemas.wordprocessingml.x2006.main.STHdrFtr.Enum type)
Creates an empty header of the specified type, containing a single empty paragraph, to which you can then set text, add more paragraphs etc.
(创建一个指定类型的空标题,包含一个空段落,然后您可以在其中设置文本、添加更多段落等。)
|
XWPFHeader |
createHeader(org.openxmlformats.schemas.wordprocessingml.x2006.main.STHdrFtr.Enum type, XWPFParagraph[] pars)
Creates a new header of the specified type, to which the supplied (and previously unattached!) paragraphs are added to.
(创建指定类型的新标题,提供的(和以前未附加的!)段落将添加到该标题中。)
|
void |
createWatermark(java.lang.String text) |
XWPFFooter |
getDefaultFooter() |
XWPFHeader |
getDefaultHeader() |
XWPFFooter |
getEvenPageFooter() |
XWPFHeader |
getEvenPageHeader() |
XWPFFooter |
getFirstPageFooter() |
XWPFHeader |
getFirstPageHeader() |
XWPFFooter |
getFooter(int pageNumber)
Get the footer that applies to the given (1 based) page.
(获取适用于给定(基于 1)页面的页脚。)
|
XWPFFooter |
getFooter(org.openxmlformats.schemas.wordprocessingml.x2006.main.STHdrFtr.Enum type)
Get this section footer for the given type
(获取给定类型的此部分页脚)
|
XWPFHeader |
getHeader(int pageNumber)
Get the header that applies to the given (1 based) page.
(获取适用于给定(基于 1)页面的标题。)
|
XWPFHeader |
getHeader(org.openxmlformats.schemas.wordprocessingml.x2006.main.STHdrFtr.Enum type)
Get this section header for the given type
(获取给定类型的此部分标题)
|
XWPFFooter |
getOddPageFooter()
Returns the odd page footer.
(返回奇数页页脚。)
|
XWPFHeader |
getOddPageHeader()
Returns the odd page header.
(返回奇数页标题。)
|
public static final org.openxmlformats.schemas.wordprocessingml.x2006.main.STHdrFtr.Enum DEFAULT
public static final org.openxmlformats.schemas.wordprocessingml.x2006.main.STHdrFtr.Enum EVEN
public static final org.openxmlformats.schemas.wordprocessingml.x2006.main.STHdrFtr.Enum FIRST
public XWPFHeaderFooterPolicy(XWPFDocument doc)
public XWPFHeaderFooterPolicy(XWPFDocument doc, org.openxmlformats.schemas.wordprocessingml.x2006.main.CTSectPr sectPr)
public XWPFHeader createHeader(org.openxmlformats.schemas.wordprocessingml.x2006.main.STHdrFtr.Enum type)
public XWPFHeader createHeader(org.openxmlformats.schemas.wordprocessingml.x2006.main.STHdrFtr.Enum type, XWPFParagraph[] pars)
public XWPFFooter createFooter(org.openxmlformats.schemas.wordprocessingml.x2006.main.STHdrFtr.Enum type)
public XWPFFooter createFooter(org.openxmlformats.schemas.wordprocessingml.x2006.main.STHdrFtr.Enum type, XWPFParagraph[] pars)
public XWPFHeader getFirstPageHeader()
public XWPFFooter getFirstPageFooter()
public XWPFHeader getOddPageHeader()
public XWPFFooter getOddPageFooter()
public XWPFHeader getEvenPageHeader()
public XWPFFooter getEvenPageFooter()
public XWPFHeader getDefaultHeader()
public XWPFFooter getDefaultFooter()
public XWPFHeader getHeader(int pageNumber)
pageNumber
- The one based page number
(pageNumber - 基于一的页码)
public XWPFHeader getHeader(org.openxmlformats.schemas.wordprocessingml.x2006.main.STHdrFtr.Enum type)
type
- of header to return
(type - 要返回的标头)
XWPFHeader
object
(XWPFHeader 对象)
public XWPFFooter getFooter(int pageNumber)
pageNumber
- The one based page number
(pageNumber - 基于一的页码)
public XWPFFooter getFooter(org.openxmlformats.schemas.wordprocessingml.x2006.main.STHdrFtr.Enum type)
type
- of footer to return
(type - 要返回的页脚)
XWPFFooter
object
(XWPFFooter 对象)
public void createWatermark(java.lang.String text)
Copyright 2021 The Apache Software Foundation or its licensors, as applicable.