use of org.docx4j.openpackaging.parts.WordprocessingML.FooterPart in project docx4j-template by vindell.
the class Docx4J_例子2 method createFooterPageNumPart.
public Relationship createFooterPageNumPart(WordprocessingMLPackage wordprocessingMLPackage, MainDocumentPart t, ObjectFactory factory, boolean isUnderLine, String underLineSz, JcEnumeration jcEnumeration) throws Exception {
FooterPart footerPart = new FooterPart();
footerPart.setPackage(wordprocessingMLPackage);
footerPart.setJaxbElement(createFooterWithPageNr(wordprocessingMLPackage, factory, isUnderLine, underLineSz, jcEnumeration));
return t.addTargetPart(footerPart);
}
use of org.docx4j.openpackaging.parts.WordprocessingML.FooterPart in project docx4j-template by vindell.
the class Docx4J_简单例子 method createTextFooterPart.
// 文字页脚
public Relationship createTextFooterPart(WordprocessingMLPackage wordprocessingMLPackage, MainDocumentPart t, ObjectFactory factory, String content, JcEnumeration jcEnumeration) throws Exception {
FooterPart footerPart = new FooterPart();
Relationship rel = t.addTargetPart(footerPart);
footerPart.setJaxbElement(getTextFtr(wordprocessingMLPackage, factory, footerPart, content, jcEnumeration));
return rel;
}
use of org.docx4j.openpackaging.parts.WordprocessingML.FooterPart in project docx4j-template by vindell.
the class Docx4J_简单例子 method createFooterPageNumPart.
public Relationship createFooterPageNumPart(WordprocessingMLPackage wordprocessingMLPackage, MainDocumentPart t, ObjectFactory factory) throws Exception {
FooterPart footerPart = new FooterPart();
footerPart.setPackage(wordprocessingMLPackage);
footerPart.setJaxbElement(createFooterWithPageNr(factory));
return t.addTargetPart(footerPart);
}
use of org.docx4j.openpackaging.parts.WordprocessingML.FooterPart in project docx4j-template by vindell.
the class Docx4J_简单例子2 method createTextFooterPart.
// 文字页脚
public Relationship createTextFooterPart(WordprocessingMLPackage wordprocessingMLPackage, MainDocumentPart t, ObjectFactory factory, String content, JcEnumeration jcEnumeration) throws Exception {
FooterPart footerPart = new FooterPart();
Relationship rel = t.addTargetPart(footerPart);
footerPart.setJaxbElement(getTextFtr(wordprocessingMLPackage, factory, footerPart, content, jcEnumeration));
return rel;
}
use of org.docx4j.openpackaging.parts.WordprocessingML.FooterPart in project docx4j-template by vindell.
the class AddingPageNrToFooter method createFooterPart.
/**
* As in the previous example, this method creates a footer part and adds it to
* the main document and then returns the corresponding relationship.
*
* @return
* @throws InvalidFormatException
*/
private static Relationship createFooterPart() throws InvalidFormatException {
FooterPart footerPart = new FooterPart();
footerPart.setPackage(wordMLPackage);
footerPart.setJaxbElement(createFooterWithPageNr());
return wordMLPackage.getMainDocumentPart().addTargetPart(footerPart);
}
Aggregations